k!mmel
22.03.09, 18:55
So, hat sich erledigt. Habe nun eine Lösung gecodet bekommen.
Danke an alle :-).
MfG
Danke an alle :-).
MfG
$icq = "331715700";
$fp = fsockopen ("status.icq.com", 80, &$errno, &$errstr, 30) or die("[ERROR - Could not connect to server (status.icq.com)]");
fputs($fp, "GET /online.gif?icq=$icq&img=5&online= HTTP/1.0\n\n");
while(!feof($fp) && !$icq_finished) {
$line = fgets ($fp,128);
if (substr($line,0,9) == 'Location:') {
if (substr($line,13,11) == 'online1.gif') { // online
$online = "1";
$icq_finished = true;
} else {
$online = "0";
$icq_finished = true;
}
}
}
fclose($fp);
if($online == "1") {
echo("Online");
} elseif($online=="0") {
echo("Offffffline");
} else {
echo("da stimmt was nicht");
}
?>
function statusabfrage($uin) {
if (!is_numeric($uin)) return FALSE;
$fp = fsockopen(‘web.icq.com’, 80, &$errno, &$errstr, 8);
if (!$fp) return FALSE;
$request = “HEAD /whitepages/online?icq=$uin&img=5 HTTP/1.0\r\n”
.“Host: web.icq.com\r\n”
.“Connection: close\r\n\r\n”;
fputs($fp, $request);
do {
$response = fgets($fp, 1024);
}
while (!feof($fp) && !stristr($response, ‘Location’));
fclose($fp);
if (
strstr($response, ‘4367′)) return ‘online’;
if (strstr($response, ‘4349′)) return ‘offline’;
if (strstr($response, ‘4386′)) return ‘disabled’;
return FALSE;
}
?>