0

So I used simple_html_dom on a http page, and everything worked fine, but now it has changed to https:// which gives me an error I cant find a fix for here on stackoverflow.

I cant figure out where to change the code so it works with https. All the other questions here are using the function file_get_contents(); and im not.

Im giving the error: "Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in..."

index.php

$target_url = "https://example.dk";
$html = new simple_html_dom();
$html->load_file($target_url);

Simple_html_dom.php

// load html from file
function load_file() {
  $args = func_get_args();
  $this->load(call_user_func_array('file_get_contents', $args), true);
}
Bidstrup
  • 1,597
  • 2
  • 16
  • 32

0 Answers0