Tutorials Infos - Anleitungen - Hilfe - Dreamcodes
 

Icq Status

Ein kleiner ICQ Online Status, nützlich wenn man eigene ICQ Icons benutzen will und nicht die Standard-Icons von der ICQ Homepage.

Script:
<?php
function GetCQStatus($uin)
{
  if (!is_numeric($uin)) {
    return "ungültige nummer";
  }
    
  $handle = fsockopen("status.icq.com", 80, &$errno, &$errstr, 8);
  if (!$handle) {
    return "icq host nicht erreichbar";
  }
    
  $request  = "HEAD /online.gif?icq=".$uin."&img=5 HTTP/1.0rn";
  $request .= "Host: 'status.icq.comrn";
  $request .= "Connection: closernrn";
    
  fputs($handle, $request);
  while (!feof($handle) && !stristr($response, "Location"))
  {
    $response = fgets($handle, 1024);
  }
  fclose($handle);

  if(strstr($response, "online1")) return "online";
  if(strstr($response, "online0")) return "offline";
  if(strstr($response, "online2")) return "versteckt";
    
  return FALSE;
}

echo GetCQStatus($_GET['uin']);
?>

 
ID: 518
eingestellt am: 30.07.2004
Autor: deto
Status zum lesen: Gast
gelesen: 9679
Webseite: www.dreamcodes.com
[Drucken]