This is what I currently have. It doesn't work, what needs to be done to fix it?
<?php
$status = GetServerStatus('http://domain.com',80)
?>
<?php
function GetServerStatus($site, $port)
{
$status = array("OFFLINE", "ONLINE");
$fp = @fsockopen($site, $port, $errno, $errstr, 2);
if (!$fp) {
return $status[0];
} else {
return $status[1];
}
}
?>