Location: PHPKode > scripts > Yahoo Status Checker > yahoo-status-checker/Check.Class.php
<?PHP

/**********************************************************************************************

* Author		Davood Jafari.
* Website		www.DavoodJafari.ir
* Email			hide@address.com
* ClassName 	Yahoo Status Checker
* Copyright(C)	2009 Davood Jafari, All rights reserved.

**********************************************************************************************/

class YahooCheck
{
	var $YahooID;
	
	function YahooCheck( $ID )
	{
		if( eregi("^[A-Za-z0-9._]+$", $ID ) )
		{
			$this->YahooID = $ID;
		} else
		{
			die( "Your Yahoo ID IS Incorect !" );
		}
	}
	
	function GetResult()
	{
		$CheckURL = "http://opi.yahoo.com/online?u=".urlencode( $this->YahooID )."&m=t&t=1";
		$Response = @file_get_contents( $CheckURL );
		if( $Response == "01" )
		{
			$Status = 0;
		} else
		if( $Response == "00" )
		{
			$Status = 1;
		} else
		{
			$Status = 2;
		}
		return $Status;
	}
}
?>
Return current item: Yahoo Status Checker