I am using Ratchet to handle my web sockets for a website I am creating. Traditionally I understand a web socket is from client side to server side (i.e. JS -> PHP), however, relating to a question I had a few days ago I've come up with a solution with using web sockets from PHP -> PHP.
So my question is - is it possible to communicate with a web socket server using PHP as well?. My goal for this is to crontab a php script that executes every second, inside that script is code that will send a message to the web socket server that will direct it appropriately afterwards.
I've already written all the code except for the part where the PHP script connects to the web socket server and sends a message, which I'm unsure how to do yet.
Any help regarding that portion would be greatly appreciated,
Thank you.
Aucun commentaire:
Enregistrer un commentaire