Fix for phpv8
This commit is contained in:
parent
0577229a8b
commit
0f020d5b20
@ -223,7 +223,7 @@ function getURLContent($url, $postorget = 'GET', $param = '', $followlocation =
|
|||||||
|
|
||||||
// Set CURLOPT_CONNECT_TO so curl will not try another resolution that may give a different result. Possible only on PHP v7+
|
// Set CURLOPT_CONNECT_TO so curl will not try another resolution that may give a different result. Possible only on PHP v7+
|
||||||
if (defined('CURLOPT_CONNECT_TO')) {
|
if (defined('CURLOPT_CONNECT_TO')) {
|
||||||
$connect_to = array(sprintf("%s:%d:%s:%d", $newUrlArray['host'], $newUrlArray['port'], $iptocheck, $newUrlArray['port']));
|
$connect_to = array(sprintf("%s:%d:%s:%d", $newUrlArray['host'], empty($newUrlArray['port'])?'':$newUrlArray['port'], $iptocheck, empty($newUrlArray['port'])?'':$newUrlArray['port']));
|
||||||
//var_dump($newUrlArray);
|
//var_dump($newUrlArray);
|
||||||
//var_dump($connect_to);
|
//var_dump($connect_to);
|
||||||
curl_setopt($ch, CURLOPT_CONNECT_TO, $connect_to);
|
curl_setopt($ch, CURLOPT_CONNECT_TO, $connect_to);
|
||||||
|
|||||||
@ -60,11 +60,11 @@ if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) {
|
|||||||
*/
|
*/
|
||||||
function realCharForNumericEntities($matches)
|
function realCharForNumericEntities($matches)
|
||||||
{
|
{
|
||||||
$newstringnumentity = $matches[1];
|
$newstringnumentity = preg_replace('/;$/', '', $matches[1]);
|
||||||
//print ' $newstringnumentity='.$newstringnumentity;
|
//print ' $newstringnumentity='.$newstringnumentity;
|
||||||
|
|
||||||
if (preg_match('/^x/i', $newstringnumentity)) {
|
if (preg_match('/^x/i', $newstringnumentity)) {
|
||||||
$newstringnumentity = hexdec(preg_replace('/;$/', '', preg_replace('/^x/i', '', $newstringnumentity)));
|
$newstringnumentity = hexdec(preg_replace('/^x/i', '', $newstringnumentity));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The numeric value we don't want as entities because they encode ascii char, and why using html entities on ascii except for haking ?
|
// The numeric value we don't want as entities because they encode ascii char, and why using html entities on ascii except for haking ?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user