Avoid error on PHP 5.6
This commit is contained in:
parent
511b138413
commit
3df79dd3c8
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user