
<?
// Connect to AOL server
$url = @fsockopen("big.oscar.aol.com", 80, &$errno, &$errstr, 3);
Now, we want to query the server for the username "SpoonoSupport":
// Query the Server fputs($url, "GET /spoonosupport?on_url=online&off_url=offline HTTP/1.0\n\n");Now that we have the information, we need to get the resultant page and then close the connection. To make sure there is not a time out, if the process takes more than 10 passes, it will assume the screenname is offline:
// See resultant page
while(!feof($url)){
$feofi++;
$page .= fread($url,256);
if($feofi > 10){
$page = "offline";
break;
}
}
fclose($url);
The reply from the server (unless it times out) is either one of these two:HTTP/1.1 302 Redirection Location: online IMG SRC=online
HTTP/1.1 302 Redirection Location: online IMG SRC=offline
// determine online status
if(strstr($page, "online")){
echo "the user is online";
}else{
echo "the user is offline";
}
?>
The final code, all compiled together:
<?
// Connect to AOL server
$url = @fsockopen("big.oscar.aol.com", 80, &$errno, &$errstr, 3);
// Query the Server
fputs($url, "GET /spoonosupport?on_url=online&off_url=offline HTTP/1.0\n\n");
// See resultant page
while(!feof($url)){
$feofi++;
$page .= fread($url,256);
if($feofi > 10){
$page = "offline";
break;
}
}
fclose($url);
// determine online status
if(strstr($page, "online")){
echo "the user is online";
}else{
echo "the user is offline";
}
?>
Copyright © 2000-2010 Spoono, LLC. All rights reserved.
Network: Reseller Web Hosting by Spoono Host | Spoonloads | Absolute Cross
Terms of Service | Privacy Policy.