Answer the question
In order to leave comments, you need to log in
How to make friends PHP and Socket IO to the end?
Hi all. Found such library elephant.io for PHP which connects it with Node JS server with Socket IO. Everything is set up and working. But I can't figure out how to read what came from the server... Sending is simple:
$version = new Version1X("http://localhost:7777");
$client = new Client($version);
$client->initialize();
$client->emit("new_message", ["Text"=>"Текст"]);
io.emit("NEW_MESSAGE", "text");
function NEW_MESSAGE(data)
{
echo data;
}
Answer the question
In order to leave comments, you need to log in
I say right away that regular JS on the client is not suitable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question