Determines whether oicq is an online php applet. Functionget_status ($ uin) {$ fp @ fsockopen (infocenter.tencent.com, 80, $ errstr, 30); if (! $ Fp) {return error;} else {fputs ($ fp, GET $ uinl000HTTP1.0); $ doyes; w function get_status ($ uin)
{
$ Fp = @ fsockopen ("infocenter.tencent.com", 80, & $ errno, & $ errstr, 30 );
If (! $ Fp)
{
Return error;
}
Else
{
Fputs ($ fp, "GET/$ uin/l/00/0/HTTP/1.0 ");
$ Do = yes;
While (! Feof ($ fp ))
{
$ Line = fgets ($ fp, 128 );
$ Do = ($ do = yes )? Yes :( eregi ("^ GIF89", $ line ))? Yes: no;
If ($ do = yes)
{
If (ereg ("Online", $ line ))
{
Return online;
}
Elseif (ereg ("Offline", $ line ))
{
Return is not online;
}
}
}
Fclose ($ fp );
}
Return unknown;
}
$ Uin = 1697313; // my own
Echo get_status ($ uin );
?>
Http://www.bkjia.com/PHPjc/532160.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/532160.htmlTechArticlefunction get_status ($ uin) {$ fp = @ fsockopen ("infocenter.tencent.com", 80, $ errstr, 30); if (! $ Fp) {return error;} else {fputs ($ fp, "GET/$ uin/l/00/0/HTTP/1.0"); $ do = yes; w...