Snippet Name: Yahoo Online Status Description: Checks status of a Yahoo user by User ID. Comment: (none) Language: PHP Highlight Mode: PHP Last Modified: March 01st, 2009
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)); } } ?>