Show IT staff Availability on Intranet or Website

This easily shows which IT staff members are available on your Intranet or website. Use the PHP code below and tweak the AIM name and your contact information for your needs.
You need access to a web server with PHP installed and an AIM account on your PC or smartphone. When you set your AIM status to available or invisible your users can see this dynamically on your site. If you install AIM on your smart phone you can set your status anywhere you go. Use this to have a peaceful day off or a quiet lunch and direct support calls to the person working. It also helps eliminate end user stress because they can now quickly see who is available.

Code:

See who is available in IT: (Be sure to refreash this page for current infomation!)

<?PHP
$screenNamerp = “billsmith”; // Add your screename to the $screenName variable
// Connect to AOL server
$url = @fsockopen(“big.oscar.aol.com”, 80, &$errno, &$errstr, 3);

// Query the Server
fputs($url, “GET /”.$screenNamerp.”?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); // Close the connection to big.oscar.aol.com
// determine online status
if(strstr($page, “online”)){
echo ‘Bill Smith is available at Ext. 111 or 312-555-5555’;
}else{
echo ‘Bill Smith is unavailable at this time.’;
}
$page = ”;
$url = ”;
?>
<br>
<br>
<?PHP
$screenNameaf = “janesmith”; // Add your screename to the $screenName variable
// Connect to AOL server
$url = @fsockopen(“big.oscar.aol.com”, 80, &$errno, &$errstr, 3);

// Query the Server
fputs($url, “GET /”.$screenNameaf.”?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); // Close the connection to big.oscar.aol.com
// determine online status
if(strstr($page, “online”)){
echo ‘Jane Smith is available at Ext. 222 or 312-444-1234’;
}else{
echo ‘Jane Smith is unavailable at this time.’;
}
$page = ”;
$url = ”;
?>