Hey,
I'm trying to figure this socket_select() function out but am not having much luck.
this is just a test script I wrote to see what it should return, but everytime the $test variable ends up blank. I can't figure out what I'm doing wrong. Any help would be appreciated.
<?php
$sock=socket_create(AF_INET,SOCK_STREAM,0);
socket_setopt($sock,SOL_SOCKET,SO_REUSEADDR,1);
socket_bind($sock,"68.34.75.215","1234");
socket_listen($sock,3);
$newSock=socket_accept($sock);
$sockets=array($sock,$newSock);
$test=socket_select($sockets,$null,$null,$null);
print "test = " . $test . "\n";
socket_close($newSock);
socket_close($sock);
?>