Pages

How to Know Yahoo Online Status


Snippet Name: Yahoo Online Status
Description: Checks status of a Yahoo user by User ID.



<?php 
 
function yahoo($id){ 
    $url = 'http://opi.yahoo.com/online?u='; 
    $data = file_get_contents($url . $id); 
    if (trim(strtolower(strip_tags($data))) != 'user not specified.') { 
        return (strlen($data) == 140) ? 'online' : 'offline'; 
    } else { 
    return trim(strip_tags($data)); 
    } 
    } 
?>

No comments:

Post a Comment