You said '$buf'.\n"; socket_write ($msgsock, $talkback, strlen ($talkback)); echo "$buf\n";} while (true); socket_close ($msgsock);} while (true); socket_close ($sock);?
This example shows a simple talkback server. Change the address and port variables to suit your setup and execute. You may then connect to the server with a command similar to: telnet 192.168.1.53 10000 (where the address and port match your setup). Anything you type will then be output on the server side, and echoed back to you. To disconnect, enter 'quit'.