您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

判断ICQ是否在线的代码

2025/12/14 20:40:58发布30次查看
//判断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
?>
//作者/来源:alpha.z
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product