/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function CheckICQStatus($uin) { if (!$fp) { return false; } $request = "HEAD /online.gif?icq=$uin HTTP/1.1 " . "Host: status.icq.com " . "Connection: close "; // read response if request done ", '', $temp); } } // remove some unnesscessary things $status = $location; // return status switch ($status) { case '/0/online0.gif': return 'offline'; case '/0/online1.gif': return 'online'; case '/0/online2.gif': return 'n/a'; } } ?> //Example: <?php $uin = '123456789'; //the icq number //checking if ($status = CheckICQStatus($uin)) { echo 'Status: ' . $status; } else { echo 'error!'; } ?>