if ( ($_SERVER['HTTP_REFERER'] == "http://www.ipsite.org/port_scan/") and (is_numeric($_GET['id'])) )
{
if ( $sock = @fsockopen($_SERVER['REMOTE_ADDR'],$_GET['id'],$errno,$errstr,20) )
{
fclose($sock);
$txt = "Open";
$color = "#33CC33";
}
else
{
if ($errno == 60)
{
$txt = "Timeout";
$color = "#CCCCCC";
}
else
{
$txt = "Closed";
$color = "#CC9900";
}
}
}
else
{
$txt = "Error";
$color = "#CC3333";
}
?>
echo $txt; ?>