Reputation: 4774
I'm trying to use Goutte through a proxy, but it goes through the original IP.
I don't get any error or anything and the requests goes just fine, but though the original IP.
I've tested the proxy on my local computer and with phantomjs and it works just great.
$opts = ['proxy' => '123.123.123.123:3128'];
$client->request('GET', $url, $opts);
$appInfo->developer = $crawler->filter('something')->text();
And it uses the computer's IP, not the proxy.
Upvotes: 2
Views: 1308
Reputation: 1314
You can set proxy manually on Guzzle Client. Try this:
$client = new \Goutte\Client();
$client->setClient(new \GuzzleHttp\Client(['proxy' => 'http://123.123.123.123:3128']));
Upvotes: 3
Reputation: 4774
I think Goutte has a bug and doesn't work with proxies. I've tried everything possible and it doesn't work.
I used curl and DOMCrawler.
Upvotes: -1