Websocket CakePHP

Hi,

I want to learn how to use websockets in CakePHP. I made some researches and found some plugins like Cake Websocket or Ratchet, but they are not working on my CakePHP project version (actually 3.8.13).
Do you have any tutorials to give me that can introduce me how to work with websocket in CakePHP ?

Thx.

Check Ratchet WebSockets for PHP.
and follow that same process for cakephp and put all Ratchet vendor file in “webroot” folder.
I’m using Ratchet this way . It is working prefectly fine ,but need to write so much codes to manage multiple user chat.

Hi debendra986,

Thx for the reply !
I managed to install a Ratchet server using this https://github.com/reactphp/socket. But still, I don’t know where to work on my project to make a simple chat to begin and learn.
If you or someone else can guide me it would be nice !

Thx.

Hi,

Following this tutorial, I’ve managed to do the Server part.
Now I’m just asking where am I supposed to implement the Pusher class in my CakePHP project ? Which directory ? Which file ?
Thanks.

Server part you can store in webroot folder and direct access to that .php file by url.