snoopy 伪装代理
我用Snoopy类的时候,伪装代理如下:
$snoopy->agent = "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; Windows 98)"
可是我输出$_SERVER["HTTP_USER_AGENT"]
代理还是我浏览器的代理,根本就没变?请各位给点意见
[解决办法]
$snoopy->agent = "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; Windows 98)";
$snoopy->fetch('xxx.php');
echo $snoopy->results;
在xxx.php里写
echo $_SERVER["HTTP_USER_AGENT"];