In this very first post on my new blog, I show you how I’ve carried out a simple push system using WebSocket specified by the RFC 6455 document. Unfortunately, I can’t bring you a live demo because of some hosting service restrictions that don’t allow me to create sockets. So, I worked on localhost with my own computer using Ubuntu, Apache and PHP-CLI. Nevertheless, you can download scripts on my github account.
You’ll find one of several basic implementations of a communication between clients and a server by WebSocket in PHP. I deliberately didn’t complicate the code (by adding other features or improvements) to make it easy to understand.
- How does a WebSocket basically work?
- The server side
- The client side
- More information