PHP – Get Yahoo Status

The given PHP example returns the current Yahoo status(online/offline) against a yahoo userid.

Code Example:
function yahoo($id){ 
    $url = ''; 
    $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)); 

echo yahoo("yahoo_userid");

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Comment

Your email address will not be published. Required fields are marked *