Bugfix: the curl option CURLOPT_SSL_VERIFYHOST is problematic

This commit is contained in:
Michael 2017-02-25 13:59:24 +00:00
commit da8a48f89e
3 changed files with 11 additions and 4 deletions

View file

@ -146,7 +146,9 @@ class ParseUrl {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $a->get_useragent());
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, (($check_cert) ? true : false));
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, (($check_cert) ? 2 : false));
if ($check_cert) {
@curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
}
$header = curl_exec($ch);
$curl_info = @curl_getinfo($ch);