Forum Moderators: coopster
$ips = '1.2.3.4-1.2.3.4-1.2.3.4';
$ports = '1.2.3.4-1.2.3.4-1.2.3.4';$ip = explode('-', $ips);
$port = explode('-', $ports);$total = count($ip);
/* START THE LOOP */
$num = 0;
while ($num < $total) {
$buffer = "";
$fp = fsockopen("udp://$ip[$num]", "$port[$num]", $errno, $errstr);
stream_set_timeout($fp, 5); // Socket Timeoutif (!$fp)
{display server is down
}
else
{
fwrite($fp,"˙˙˙˙details\x00");fclose($fp);
read the returned packet and display the info in a table
}
$num++; //add one to $num
}
/* END THE LOOP */
If anyone could help me figure out a way to get it not to hang, it would be greatly apprciated.