Hi
I'm trying to listen to port 119 with a socket connection. The script looks
like this:
It works fine until this line "if(($ac=accept_connect($sock))<0){"
Thats where the problem is, it never accepts a connection it just keeps on
running.
<?
$sock = socket (AF_INET, SOCK_STREAM, 0);
$bin = bind($sock, '127.0.0.1', '119');
$lis = listen($sock, 4);
echo strerror($sock). "<BR>";
echo strerror($bin) . "<BR>";
echo strerror($lis). "<BR>";
if(($ac=accept_connect($sock))<0){
echo strerror($ac). "<BR>";
}
else
{
$str ='';
echo $ac;
$re =read($ac, $str, 10000);
}
echo strerror($re) . "<BR>";
echo $re . "<BR>";
?>
thanks
Shimon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]