Answer the question
In order to leave comments, you need to log in
How to connect client to socket in PHP?
I'm trying to connect to the wss://tamtam-ws.ok.ru/websocket socket, but nothing happens, it gives the error Could not open socket to "tamtam-ws.ok.ru:443": (0).
The socket connection can be tested at: https://tamtam-ws.ok.ru/ - everything works fine there.
To connect, I use the https://github.com/arthurkushman/php-wss
library
. And when connecting to wss://echo.websocket.org/?encoding=text, everything is fine.
I've already searched through a lot of things, I don't even know where to dig :(
Answer the question
In order to leave comments, you need to log in
Unfortunately, it is difficult to answer such questions.
Please provide code that does the above.
If the library works, then the problem is in it.
You can try another library, in my opinion very easy to learn:
https://github.com/Textalk/websocket-php
And it definitely works) I just checked it today)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question