$socket = stream_socket_server("tcp://xxxxxx:8000", $errno, $errstr); if (!$socket) { die("$errstr ($errno)\n"); }