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

snoopy 伪装代理解决思路

WBOY
Release: 2016-06-13 13:49:50
Original
1343 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template