I am trying to open an udp socket using fsocketopen, I 'm testing it by making sure the machine I'm trying to connect to is offline or online. this is the basic code:
$handle = fsockopen("udp://" . cfgServer, $cfgPort, &$errno, &$errstr, 10);
if (!$handle)
{ echo "$errno : $errstr <br/>"; }
else
{
echo "Socket open!";
}
fclose($handle);
My problem is, no matter if socket connects or not it always falls to the "Socket open"
This means that my first if is not working. Does anyone know why it doesn't return FALSE, like the manual says? Any ideas? Thanks