Home  >  Article  >  Backend Development  >  snoopy 伪装代理解决思路

snoopy 伪装代理解决思路

WBOY
WBOYOriginal
2016-06-13 13:49:501326browse

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"];

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn