<?php
include ("Ystatus.Class.php");
$yahoostatus = new CYahooStatus ();
$yahoo_ID = $_GET["YID"];
$status = $yahoostatus->execute ("$yahoo_ID", $errno, $errstr);
if ($status !== false)
{
switch ($status) {
case YAHOO_ONLINE:
$image = imagecreatefromgif("img/on.gif");
break;
case YAHOO_OFFLINE:
$image = imagecreatefromgif("img/off.gif");
break;
case YAHOO_UNKNOWN:
$image = imagecreatefromgif("img/off.gif");
break;
}
header("Content-type: image/gif");
imagegif($image);
}
else // if ($status)
{
print ("An error occurred during CYahooStatus query: <br />");
print ("Error n. " . $errno . ": " . $errstr);
}
?>
|