Category: websocket

Websockets in Your Synchronous Site

I’m always yammering on about writing asynchronous PHP code, and for a reason. I think it’s healthy to get fresh perspectives – to be exposed to new programming paradigms. Asynchronous architecture is common in other programming languages, but it’s only just finding its feet in PHP. The trouble is that this...

How to Quickly Build a Chat App with Ratchet

In this tutorial, we’ll be taking a look at Ratchet, a PHP library for working with WebSockets. Let’s start by defining what WebSockets are. MDN says: WebSockets is an advanced technology that makes it possible to open an interactive communication session between the user’s browser and a server. With this API, y...