FriendsOfPHP / Goutte

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

I get "SSL connect error for" #419

Closed trbsi closed 4 years ago

trbsi commented 4 years ago

This is my code

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

$requestOptions['verify_peer'] = false;
$requestOptions['verify_host'] = false;
$httpClient = HttpClient::create($requestOptions);
$this->client = new Client($httpClient);

Very simple and straight forward. I cannot usu Guzzle, I tried, it does not implement HttpClientInterface

I have no idea what to do, can someone help me?

trbsi commented 4 years ago

The problem was that site I tried to crawl used TLS1.0 so I had to allow TLS1.0 on my server. I was using Ubuntu 20 Here is solution: https://askubuntu.com/a/1250807/220590