您好,欢迎访问一九零五行业门户网

判断ICQ是否在线的代码_PHP教程

//判断icq是否在线的代码
function get_status($uin)
{
$fp = fsockopen (wwp.icq.com, 80, &$errno, &$errstr, 30);
if(!$fp)
{
echo $errstr ($errno)
;
}
else
{
fputs($fp, get /scripts/online.dll?icq=$uin&img=5 http/1.0 );
$do = yes;
while(!feof($fp))
{
$line = fgets ($fp,128);
$do = ($do == yes)?yes:(eregi(^gif89, $line))?yes:no;
//echo $line;
if($do == yes)
{
if(ereg(@, $line))
{
return online;
}
elseif(ereg(醱, $line))
{
return offline;
}
elseif(ereg(s, $line))
{
return disabled;
}
}
}
fclose($fp);
}
return unknown!;
}
$uin=72485936; // sonymusic 的icq,呵呵。
echo get_status($uin);
// offline
?>
http://www.bkjia.com/phpjc/532211.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/532211.htmltecharticle//判断icq是否在线的代码 function get_status($uin) { $fp = fsockopen (wwp.icq.com, 80, $errstr, 30); if(!$fp) { echo $errstr ($errno) ; } else { fputs($fp, get /script...
其它类似信息

推荐信息