No recent searches
Popular Articles
Sorry! nothing found for
Posted almost 4 years ago by autolina
Hi there.
I'm using the example for php.
$url = 'https://httpbin.scrapinghub.com/get'; $proxy = 'proxy.crawlera.com:8011'; $proxy_auth = '<API KEY>:'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_PROXYUSERPWD, $proxy_auth); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_TIMEOUT, 180); curl_setopt($ch, CURLOPT_CAINFO, '/path/to/zyte-proxy-ca.crt'); //required for HTTPS curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); //required for HTTPS
I downloaded the file zyte-proxy-ca.crt
Checked api-key in my profile.
But when I run the script I receive 407 error.
HTTP/1.1 200 OK
HTTP/1.1 407 Proxy Authentication Required
X-Crawlera-Error: bad_proxy_auth
X-Crawlera-Version: 1.47.5
Proxy-Authenticate: Basic realm="Crawlera"
Content-Length: 0
Date: Tue, 06 Apr 2021 13:46:29 GMT
Proxy-Connection: close
Connection: close
What do I wrong?
0 Votes
0 Comments
Login to post a comment
People who like this
This post will be deleted permanently. Are you sure?
Hi there.
I'm using the example for php.
I downloaded the file zyte-proxy-ca.crt
Checked api-key in my profile.
But when I run the script I receive 407 error.
HTTP/1.1 200 OK
HTTP/1.1 407 Proxy Authentication Required
X-Crawlera-Error: bad_proxy_auth
X-Crawlera-Version: 1.47.5
Proxy-Authenticate: Basic realm="Crawlera"
Content-Length: 0
Date: Tue, 06 Apr 2021 13:46:29 GMT
Proxy-Connection: close
Connection: close
What do I wrong?
0 Votes
0 Comments
Login to post a comment