Wednesday, 26 November 2014

stream_socket_client - Open Internet or Unix domain socket connection

resource stream_socket_client ( string $remote_socket [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout") [, int $flags = STREAM_CLIENT_CONNECT [, resource $context ]]]]] )
Open Internet or Unix domain socket connection
Initiates a stream or datagram connection to the destination specified by remote_socket. The type of socket created is determined by the transport specified using standard URL formatting: transport://target. For Internet Domain sockets (AF_INET) such as T

if (!
$fp) {
"$errstr ($errno)<br />\n";
} else {
fwrite($fp"GET / HTTP/1.0\r\nHost:\r\nAccept: */*\r\n\r\n");
    while (!
feof($fp)) {

No comments:

Post a Comment