Code used to determine whether ICQ is online & lt ;? & Nbsp; functionget_status ($ uin) {& nbsp; $ fpfsockopen (& quot; wwp.icq.com & quot;, 80, & $ errno, & $ errstr, 30); & nbsp; if (! $ Fp) {& nbsp; echo // code used to determine whether ICQ is online
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 ("example", $ line ))
{
Return 'offline ';
}
Elseif (ereg ("S", $ line ))
{
Return 'disabled ';
}
}
}
Fclose ($ fp );
}
Return 'unknown! ';
}
$ Uin = "72485936"; // sonymusic's ICQ, huh, huh.
Echo get_status ($ uin );
// Offline
?>
// Author/source: Alpha. Z