Start a new topic
Answered

Can't get your sample PHP to work

Hi there.


I just signed up for Crawlera because I saw just how simple your PHP sample script (https://support.scrapinghub.com/support/solutions/articles/22000203568-using-crawlera-with-php) was. However, I cannot get it to work. I keep getting this error message all the time:


cURL error: Failed connect to proxy.crawlera.com:8010; Connection refused


I have waited for provisioning to happen, copied my api key in the script and uploaded the crt file to the server and updated the path variable (CURLOPT_CAINFO) accordingly.


Still, the same error over and over again. In fact, I don't really know what's the correct way to replace the API KEY variable in the script:


$proxy_auth = '<API KEY>:';


I have tried all possible ways I can imagine:


$proxy_auth = 'myapikey';

$proxy_auth = 'myapikey:';

$proxy_auth = '<myapikey>:';

$proxy_auth = '<API KEY>:myapikey:';


I think this should be made clear somewhere. I can't seem to find any information about this.


Could anyone help me, please. Thanks in avance.


Cheers,

David


Best Answer

Check your firewall rules, port 8010 needs to be open as it is the port Crawlera serves.


Answer

Check your firewall rules, port 8010 needs to be open as it is the port Crawlera serves.


1 person likes this

Thanks for your input, Nestor. I will give it a try!

By the way, Nestor. You were right. The problem was the firewall. As soon as I opened the port, it worked right away. Thank you!

I'm glad you got it working :)

Login to post a comment