WebSocket client in PHP? [closed]

None of the above is a good answer. Several of them are about a server, whereas the question is about a client. The code from Rodislav didn’t work for me, as it didn’t talk to my WebSockets server on Heroku. However, this library worked very well:

https://github.com/Devristo/phpws

UPDATE: While this code worked when all was well, there seems to be no error returns or exceptions at all, and as a result it’s unusable when there’s an error (e.g., the server isn’t running, the address is wrong, the port is blocked, etc.). So, while it was fun to experiment with, it’s not usable in production code.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)