In a PHP script I am writing, I need to send a control+z character down a network socket I have previously created. I understand the ctrl+z character to be chr(26), so at the end of the string I am sending I have added a new line (\r\n) and then the chr(26) as follows:
$socket=fsockopen($host['host'],$host['port']);
fputs($socket, "I am...
I have a PHP CLI script mostly written that functions as a chat server for chat clients to connect to (don't ask me why I'm doing it in PHP, thats another story haha).
My script utilizes the socket_select() function to hang execution until something happens on a socket, at which point it wakes up, processes the event, and waits until t...
Hi,
I have written a very simple socket server.
It listens in post 63254.
First i did a socket_create, socket_bind, socket_listen so here a connection is listening.
Then in a loop i do the socket accpet. so here another listen.
the read function reads untill i input exit.
after that the resource id by socket_accept closes.
and then th...