Skip to content
This repository was archived by the owner on Mar 26, 2022. It is now read-only.
This repository was archived by the owner on Mar 26, 2022. It is now read-only.

SSL3_GET_SERVER_CERTIFICATE:certificate verify failed #17

@newroseji

Description

@newroseji

I got following Error when I tried with secured url:
ErrorException in Htmldom.php line 178: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

However, I fixed this issue with following extra arguments passed in load_file() method after
$args = func_get_args(); line
in Htmldom class.

$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$args[1]=false;
$args[2]=stream_context_create($arrContextOptions);

Just wondering if the author can push it built-in with much cleaner/optimized way instead of hard-coding like I did above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions