|
|
|
Author
|
Topic: class ICQ (Read 592 times)
|
|
aziz
|
 |
class ICQ
« on: October 02, 2006, 08:17:51 pm » |
|
PHP Manual den alıntı küçük ama hoş bir sınıf... <?php
class ICQ { var $crc = array('253889085' => 'offline', '1177883536' => 'online', '1182613274' => 'hidden'); //CRCs valid as long as the redirect-page does not change function getCrc($url) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_HEADER, 0); ob_start(); curl_exec ($ch); curl_close ($ch); $cache = ob_get_contents();
ob_end_clean(); //print($cache); return (string)abs(crc32($cache)); } function status($number) { $check = $this->getCrc( 'http://status.icq.com/online.gif?icq=' . $number . '&img=5'); if (in_array($check, array_keys($this->crc))) { return $this->crc[$check]; } return false; } } ?>
Durum:
<?php $icq = new ICQ(); print($icq->status('icq numaranız')); ?>
|
|
|
|
|
Logged
|
|
|
|
|
 |
|