if you want to use a non block socket you must to use socket_last_error
if(!socket_last_error($sc)){
if($buffer=socket_read($sc,512,PHP_NORMAL_READ)){
echo $buffer;
}
}
if you use it your script wont take all your memory
if you want to use a non block socket you must to use socket_last_error
if(!socket_last_error($sc)){
if($buffer=socket_read($sc,512,PHP_NORMAL_READ)){
echo $buffer;
}
}
if you use it your script wont take all your memory