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 $ip = $_SERVER['REMOTE_ADDR']; $url = "http://ipgeobase.ru:7020/geo?ip=".$ip; ..
Decoded Output download
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$url = "http://ipgeobase.ru:7020/geo?ip=".$ip;
$xmlstr = file_get_contents($url);
$xml = new SimpleXMLElement($xmlstr);
$region = $xml->ip[0]->region;
$city = $xml->ip[0]->city;
if(empty($region))
{
$region = ' ';
$city = ' ';
}
else
{
$region = iconv("utf-8", "utf-8", $region);
$city = iconv("utf-8", "utf-8", $city);
}
$output = $modx->setPlaceholder('output',$region);
$output = $modx->setPlaceholder('output1',$city);
return $output; ?>
Did this file decode correctly?
Original Code
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$url = "http://ipgeobase.ru:7020/geo?ip=".$ip;
$xmlstr = file_get_contents($url);
$xml = new SimpleXMLElement($xmlstr);
$region = $xml->ip[0]->region;
$city = $xml->ip[0]->city;
if(empty($region))
{
$region = ' ';
$city = ' ';
}
else
{
$region = iconv("utf-8", "utf-8", $region);
$city = iconv("utf-8", "utf-8", $city);
}
$output = $modx->setPlaceholder('output',$region);
$output = $modx->setPlaceholder('output1',$city);
return $output;
Function Calls
| file_get_contents | 1 |
Stats
| MD5 | d142a591e45948c9225024b0e2983a5c |
| Eval Count | 0 |
| Decode Time | 90 ms |