Closed Leleking closed 3 years ago
After digging around i found the fix. use Symfony\Component\HttpClient\HttpClient;
$url = 'https://www.bog.gov.gh/treasury-and-the-markets/daily-interbank-fx-rates/'; $client = new Client(HttpClient::create(['verify_peer' => false, 'verify_host'=> false])); $crawler = $client->request('GET', $url);
note that disabling peer verification is insecure though. You should rather make sure that CA certificates are configured properly on your server.
I am using this package with laravel. Locally, it works just fine but after deploying to the server I get this error
Symfony\Component\HttpClient\Exception\TransportException: Peer certificate cannot be authenticated with given CA certificates for https://example.com