Skip to content

Instantly share code, notes, and snippets.

@gmaggio
Created July 8, 2014 11:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmaggio/ed1ae382bd6927f69819 to your computer and use it in GitHub Desktop.
Save gmaggio/ed1ae382bd6927f69819 to your computer and use it in GitHub Desktop.
[Yahoo] Yahoo Messenger Online/Offline Status Detection #soical-media
<?php
$yahooID = "YOUR_ID";
$status = file_get_contents("http://opi.yahoo.com/online?u=".$yahooID."&m=a&t=1");
if ($status === '00') {
echo "OFFLINE!";
} else if ($status === '01') {
echo "ONLINE!";
}
/*
Source:
http://tildemark.com/adding-ym-online-status-icons-to-websites-using-php-and-html-scripts/
*/
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment