Avoid error on PHP 5.6

This commit is contained in:
Laurent Destailleur 2021-04-19 20:49:31 +02:00
parent 511b138413
commit 3df79dd3c8

View File

@ -217,8 +217,10 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
break; break;
} }
// Set CURLOPT_CONNECT_TO so curl will not try another resolution that may give a different result // Set CURLOPT_CONNECT_TO so curl will not try another resolution that may give a different result. Possible only on PHP v7+
curl_setopt($ch, CURLOPT_CONNECT_TO, $iptocheck); if (defined('CURLOPT_CONNECT_TO')) {
curl_setopt($ch, CURLOPT_CONNECT_TO, $iptocheck);
}
} }
// Getting response from server // Getting response from server