<?php
error_reporting(0);
if (isset ($_GET['host']))
	$host= $_GET['host'];
if (isset ($_GET['port']))
	$port= $_GET['port'];
header("Content-type: image/gif");
$fp= fsockopen($host, $port, $errno, $errstr, 4);
if (!$fp)
	readfile('../images/offline.gif');
else
	readfile('../images/online.gif');
echo $errno;
echo $errstr;
fclose($fp);
?>