FriendsOfPHP / Goutte

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

Proxy not working #455

Open gyan111 opened 2 years ago

gyan111 commented 2 years ago

I am using Goutte with Laravel and hosted on shared hosting.

On local few proxies are working and few are not.

But on server which is a namecheap shared hosting proxy not working at all.

Here is my code.

use Symfony\Component\HttpClient\HttpClient; use Goutte\Client;

used in different order too but same issue.

$proxy='5.11.17.230:1080'; $config = ['proxy' => $proxy, 'timeout' => 60]; $client = new Client(HttpClient::create($config));

error

Failed to connect to 5.11.17.230 port 1080: Connection refused for

I have used several proxies from several source but same issue.