Welcome, Guest. Please login or register.
Did you miss your activation email?
July 09, 2008, 06:03:13 am
42749 Posts in 8091 Topics by 17932 Members
Latest Member: codder
Turk-Php.Com Forum  |  Yardım Forumları  |  PHP Yardım Forumu  |  PHP Class Deposu  |  class ICQ « previous next »
Pages: [1] Print
Author Topic: class ICQ  (Read 591 times)
aziz
PHP Programcısı
****
Offline Offline

Posts: 940



View Profile
class ICQ
« on: October 02, 2006, 08:17:51 pm »

PHP Manual den alıntı küçük ama hoş bir sınıf...
Code:
<?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 ($chCURLOPT_URL$url);
   
curl_setopt ($chCURLOPT_HEADER0);
   
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($checkarray_keys($this->crc))) {
     return 
$this->crc[$check];
   }
   return 
false;
 }
    
}
?>


Durum:

<?php
 $icq 
= new ICQ();
 print(
$icq->status('icq numaranız'));
?>
Logged

Jabber:
xmpp:aziz@member.turk-php.com
Alihan ÇETİN
www.azizce.com
Pages: [1] Print 
« previous next »
Jump to: