FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

Setting tor(socks5) proxy gives error. #223

Open jitendrar opened 9 years ago

jitendrar commented 9 years ago

Hi,

I want to use TOR proxy in my scraping script. I have tried to set socks5 tor proxy using below code but it gives curl error. If same curl option I am setting in my simple curl request PHP file then it works fine. But it gives error in Goutte library.

$client->getClient()->setDefaultOption('config/curl/'.CURLOPT_PROXY, '127.0.0.1:9050'); $client->getClient()->setDefaultOption('config/curl/'.CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);

Thanks, Jitendra

jitendrar commented 9 years ago

Help needed on this ASAP.