PHP Classes

File: status.php

Recommend this page to a friend!
  Classes of Moein Akbarof   Yahoo status pm   status.php   Download  
File: status.php
Role: Application script
Content type: text/plain
Description: The class
Class: Yahoo status pm
Retrieve the online status of an Yahoo user
Author: By
Last change:
Date: 14 years ago
Size: 709 bytes
 

Contents

Class file image Download
<?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);
    }
?>