Just out of interest, Is that the preferred method? grabing most of the web page from the site,
Or, would doing a socket check, on the server itself be fine?
ie...
function method2 ()
{
$server = "udp://laanx.fragnetics.com";
$port = "7777";
$fp = fsockopen($server, $port, $errno, $errstr);
$result = fwrite($fp, "\n");
if ($result != FALSE) {
echo "Connecting To The Server Reports - Online<p>\n";
return;
}
else {
echo "Connecting To The Server Reports - Offline<p>\n";
}
fclose($fp);
}
method2();
I'd figure this would be a lot faster then grabbing the status page, but wondering if it could either
#1 have adverse effects, Or
#2 Violate the connection agreement.
*edit: Fixed code correctness