Hello,
I didnt try this myself but hope that it would help u.
stream_socket_client
(PHP 5 CVS only)
stream_socket_client -- Open Internet or Unix domain socket connection
Description
resource stream_socket_client ( string remote_socket [, int &errno [, string &errstr [, float timeout [, int flags [, resource context]]]]])
<?php
$fp = stream_socket_client("tcp://www.example.com:80", $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
} else {
fputs ($fp, "GET / HTTP/1.0\r\nHost: www.example.com\r\nAccept: /\r\n\r\n");
while (!feof($fp)) {
echo fgets ($fp,1024);
}
fclose ($fp);
}
?>
Cheers,
yousaf FAYYAZ.