Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何从curl请求中删除googlecaptcha?_Php_Curl_Recaptcha - Fatal编程技术网

Php 如何从curl请求中删除googlecaptcha?

Php 如何从curl请求中删除googlecaptcha?,php,curl,recaptcha,Php,Curl,Recaptcha,我试图从一个网站上搜集数据。但问题是当我发送CURL请求时,每次都会显示GoogleRecaptcha 如何删除此安全检查 这是我的密码: $url = 'https://www.zillow.com/browse/homes/ca/'; $data = array( 'secret' => "my-secret", 'response' => "my-response" ); $ch = curl_init(); curl

我试图从一个网站上搜集数据。但问题是当我发送CURL请求时,每次都会显示GoogleRecaptcha

如何删除此安全检查

这是我的密码:

$url = 'https://www.zillow.com/browse/homes/ca/';

$data = array(
    'secret' => "my-secret",
    'response' => "my-response"
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result=curl_exec ($ch);
curl_close ($ch);

echo '<pre>';
print_r($result); 
echo '</pre>';
exit;
这是不可能的,至少不容易做到

reCAPTCHA的用例是完全禁止您正在做的事情。 但是,有些站点仅在未发送用户代理标头时才请求reCAPTCHA。 试一试


这会让网站认为您正在Windows 7上使用Firefox 47

您无法删除该安全检查。你可能会破坏它,让它相信你的代码是人类的,但我敢肯定,如果你成功的话,谷歌很快就会修补它。然而,Zillow似乎有API,所以为什么不使用它呢?
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0'
));