1. <?php
  2. $yahoo_id = "preacherskid007";
  3. $url = "http://opi.yahoo.com/online?u="."$yahoo_id";
  4. $read = file_get_contents($url);
  5.  
  6. // Determines the online status
  7. if (preg_match("/mc/", $read) > 0) {$online = 1;}
  8.  
  9. // Output can be a picture, text...
  10. if($online == 1) {echo "Yes, $id is online!";}
  11. else {echo "Sorry, $id is not online.";}
  12. ?>