I need communicate php to NodeJs (Socket.io) Server. I find i library about it. But i can't recieve data. The library name is Elephant.io. There is some way to communicate Php and Socket.io ? I need it. I need Send data and Recieve data.
This is my Library -> https://github.com/Wisembly/elephant.io
But it doesn't work.
This is my code block and i get this error ;
$client = new Client(new Version1X('http://192.168.1.4:150/'));
$client->initialize();
while(true)
{
$r=$client->read();
if (!empty($r)) {
echo $r;
}
}
$client->close;
This is Cmd error;
PHP Notice: Undefined offset: 2 in C:\xampp\htdocs\SocketClientExample\src\Engine\AbstractSocketIO.php on line 122
Notice: Undefined offset: 2 in C:\xampp\htdocs\SocketClientExample\src\Engine\AbstractSocketIO.php on line 122
PHP Notice: Undefined offset: 2 in C:\xampp\htdocs\SocketClientExample\src\Engine\AbstractSocketIO.php on line 123
Notice: Undefined offset: 2 in C:\xampp\htdocs\SocketClientExample\src\Engine\AbstractSocketIO.php on line 123
PHP Notice: Uninitialized string offset: 1 in C:\xampp\htdocs\SocketClientExample\src\Payload\Decoder.php on line 95
Notice: Uninitialized string offset: 1 in C:\xampp\htdocs\SocketClientExample\src\Payload\Decoder.php on line 95
I want to another Library for it. Do have anyone know something about it ?