see4far: imagecratefrom...

Beitrag lesen

War wirklich mein Fehler :-)
So gehts:
<?PHP

function GetICQ($uin) {
    if (!is_numeric($uin)) return FALSE;

$fp = fsockopen('status.icq.com', 80, &$errno, &$errstr, 8);
    if (!$fp) return FALSE;

$request = "HEAD /online.gif?icq=135948530&img=5  HTTP/1.0\r\n"
              ."Host: status.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 $response;
}

// Aufruf:
echo GetICQ(135948530);

?>

Die Funktion gibt mir nun
Location: /5/online1.gif  für online und
Location: /5/online0.gif  für offline zurück.

Jetzt kann ich das ja einfach mal einsetzten. Danke dir vielmals für deine gute Hilfe.

see4far