Php 谷歌搜索拒绝访问

Php 谷歌搜索拒绝访问,php,curl,proxy,Php,Curl,Proxy,我有个小问题 有时我在搜索随机关键字时会出现错误“拒绝访问” 看起来是这样的: 这是密码 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $Url); curl_setopt($ch, CURLOPT_HEADER, 0); // no headers in the output curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // output to variable curl_setopt($ch,

我有个小问题

有时我在搜索随机关键字时会出现错误“拒绝访问”

看起来是这样的:

这是密码

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $Url);

curl_setopt($ch, CURLOPT_HEADER, 0); // no headers in the output
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // output to variable
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0");
curl_setopt($ch, CURLOPT_PROXYPORT, $port);
curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
curl_setopt($ch, CURLOPT_PROXY, $ip);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, $loginpassw);

// Download the given URL, and return output
$output = curl_exec($ch);

// Close the cURL resource, and free system resources
curl_close($ch);

我们能得到一些代码吗?我只是使用一个带有私有代理的简单cURL调用。没有比这更奇特的了。代理运行得很好,因为它检查了很多其他关键字,没有任何问题。没有任何代码,它将很难帮助您。好了:也许这是您正在卷曲的远程网站,它阻止您连接到它(太多)?