当前位置:Linux教程 - Php - 用php调用oicq在线程序

用php调用oicq在线程序

qq.php
<?
$tencent
="http://search.tencent.com/cgi-bin/friend/oicq_find?oicq_no=";
$img="http://img.tencent.com/face/s/0-2.gif";
$tp="";
if (
$qq) {
$fp=fopen("$tencent$qq","r");
while (
$buffer = fgets($fp, 4096)) {
$tp.=$buffer;
}
fclose($fp);
$p=strpos($tp,"ShowResult(\"FFFFFF\",\"");
if (
$p>0) {
$pp=strpos($tp,"\",\"$qq\",\"");
if (
$pp>0) {
$img=substr($tp,0,$pp);
$img=substr($img,$p+21);
//echo $img;
}
}
}
Header("Location: $img");
?>
html调用方法:
<img src="qq.php?qq=9977381">
UBB调用方法:
[img]http://mstong.net/new/qq.php?qq=9977381[/img]