voku / simple_html_dom

📜 Modern Simple HTML DOM Parser for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

file_get_contents(): SSL operation failed with code 1

endcoreAK opened this issue · comments

Hey there,

I just set up a test system and ran your imdb example, it works great. Other domains also work fine, but I found a problem with one of them.

$data = scraping_imdb('https://www.webhostlist.de/');

I receive the following error:

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in C:\dev\composer\vendor\voku\portable-utf8\src\voku\helper\UTF8.php on line 1680

Warning: file_get_contents(): Failed to enable crypto in C:\dev\composer\vendor\voku\portable-utf8\src\voku\helper\UTF8.php on line 1680

Warning: file_get_contents(https://www.webhostlist.de/): failed to open stream: operation failed in C:\dev\composer\vendor\voku\portable-utf8\src\voku\helper\UTF8.php on line 1680

I have googled and found many possible solutions, like updating xampp & windows or changing the certificate like https://curl.haxx.se/docs/caextract.html, but I still have this problem, only with this one domain (found so far).

Do you have any idea for this issue?

You can use a real HTTP client for the download, I added some examples here: https://github.com/voku/httpful/blob/master/examples/