1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
| <?
function icqStatus($uin, $image_num)
{
$doc = "/online.gif?icq=". $uin ."&img=". $image_num;
$url = "status.icq.com";
$findme = "Location: ";
$fp = fsockopen($url, 80, $errno, $errstr, 30);
if(!$fp)
{
echo("$errstr ($errno)<br />n");
}
else
{
fputs($fp, "GET $doc HTTP/1.0rnHost: $urlrnrn");
while(!feof($fp))
{
$httpresult = fgets($fp, 4096);
$pos = strpos($httpresult, $findme);
if ($pos !== false)
{
$pieces = explode(" ", $httpresult);
$image_src = rtrim($pieces[1]);
}
}
fclose($fp);
}
Return $url . $image_src;
}
?> |