How to encode data for sending throught socket in php? -


the problem when i'm trying send number or string number or symbols trough socket sends symbols. example when trying send <ping>14399</ping> on other side curl result string(18) "14399". sending use socket_write($client->getsocket(), $text, strlen($text)). how encode data ?

the problem not in sending through socket, since <ping>14399</ping> 18 characters long. possibly output displayed browser , markups in < > thereby dropped.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -