Clan Adverts

PHP Web Host - Quality Web Hosting For All PHP Applications

 

Check Aol Status

Description: Nifty script to check Aol Status
Version: 1.0
Added on: 24 February 2007
Author: unkown
Difficulty Level: Very Easy
Views: 679
Rating: 5.0 (1 Vote)
Detailed ProfileView Comments (1)

Ok lets get started by creating a file called aimstatus.php


Code:
<?

// Connect to the AIM server

$url = @fsockopen("big.oscar.aol.com", 80, &$errno, &$errstr, 3);



// Ask the Server About The User, Make sure to change "USERNAME" to your AIM screen name

fputs($url, "GET /USERNAME?on_url=online&off_url=offline HTTP/1.0

");



// Receive The Results

while(!feof($url)){

$feofi++;

$page .= fread($url,256);

if($feofi > 10){

$page = "offline";

break;

}

}

fclose($url);



// Determine the Result, And Display It

if(strstr($page, "online")){

echo "This User Is Online";

}else{

echo "This User Is Offline";

}

?>


Then just put the following code where you want to display the result:

Code:
<? include("aimstatus.php") ?>


Remember to play around with the script and have fun, for example displaying an image for online/offline status instead of text.