Minimal example based on PHP manual example found here:
http://php.net/manual/en/sockets.examples.php
Create a websocket script that listens to Port 5000
Use putty, terminal to run telnet 127.0.0.1 5000 (localhost).
This script replies with the message you sent (as a ping-back)
<?php
set_ti...