function testguardcookie($cookiestring, $sourceip) { global $security_cookie; if (preg_match("/" . $security_cookie . "=([^;]*)/is", $_SERVER['HTTP_COOKIE'], $matches)) { $ip = safeBase64_decode($matches[1]); if ($ip === $sourceip) { return 1; } else { return 0; } } }
function decodebaseRequest($url) { global $myproxy, $dataarray; //$url=str_replace("%5C", "\\", $url); if (preg_match("/([^\\/]*)" . URLDELIMITER . "(\\/.*)/ims", $url, $matches) != 0) { $body = safeBase64_decode($matches[1]); if (($p1 = strpos($body, INFODELIMITER)) > 1) { $url = substr($body, 0, $p1); $body = substr($body, $p1 + strlen(INFODELIMITER)); $dataarray = rawdecode($dataarray, $body); } else { $url = $body; } return replaceFunnyChars($url . $matches[2]); } else { return NULL; } }