1. <?php
$id=isset($_REQUEST['id'])?$_REQUEST['id']:NULL;
$url = '
http://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?get_nick=1&uins='.$id;
$n = file_get_contents($url);
//echo $n.'<br>';
$z = ',"';
$y = '",0]})';
echo getSubstr($n,$z,$y);
function getSubstr($str, $leftStr, $rightStr)
{
$left = strpos($str, $leftStr);
$right = strpos($str, $rightStr,$left);
if($left < 0 or $right < $left) return '';
return substr($str, $left + strlen($leftStr), $right-$left-strlen($leftStr));
}
?>
2. 访问:http://你的域名/文件名.php?id=QQ号码
5. 顺便送个头像的:
http://q.qlogo.cn/headimg_dl?dst_uin=905172616&spec=640&img_type=jpg