Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

Your IP is = <?php $ip = getenv("REMOTE_ADDR") ; Echo $ip; ?> <br /> Your Hostname is:..

Decoded Output download

Your IP is = <?php $ip = getenv("REMOTE_ADDR") ;  Echo $ip;  ?>  <br /> 
Your Hostname is: <?php echo $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); ?> <br /> 
Your Hostname is: <?php echo $host=gethostbyaddr( $_SERVER['REMOTE_ADDR'] ); ?> <br /> 
-------------------------<br /> 
<!-- ====================================================================================================== --> 
Your Country Name is: <?php 
 
function visitor_country() 
{ 
    $client  = @$_SERVER['HTTP_CLIENT_IP']; 
    $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; 
    $remote  = $_SERVER['REMOTE_ADDR']; 
    $result  = "Unknown"; 
    if(filter_var($client, FILTER_VALIDATE_IP)) 
    { 
        $ip = $client; 
    } 
    elseif(filter_var($forward, FILTER_VALIDATE_IP)) 
    { 
        $ip = $forward; 
    } 
    else 
    { 
        $ip = $remote; 
    } 
 
    $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip)); 
 
    if($ip_data && $ip_data->geoplugin_countryName != null) 
    { 
        $result = $ip_data->geoplugin_countryName; 
    } 
 
    return $result; 
} 
 
 
echo visitor_country(); // Output Coutry name [Ex: United States] 
 
?>

Did this file decode correctly?

Original Code

Your IP is = <?php $ip = getenv("REMOTE_ADDR") ;  Echo $ip;  ?>  <br />
Your Hostname is: <?php echo $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); ?> <br />
Your Hostname is: <?php echo $host=gethostbyaddr( $_SERVER['REMOTE_ADDR'] ); ?> <br />
-------------------------<br />
<!-- ====================================================================================================== -->
Your Country Name is: <?PHP

function visitor_country()
{
    $client  = @$_SERVER['HTTP_CLIENT_IP'];
    $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];
    $remote  = $_SERVER['REMOTE_ADDR'];
    $result  = "Unknown";
    if(filter_var($client, FILTER_VALIDATE_IP))
    {
        $ip = $client;
    }
    elseif(filter_var($forward, FILTER_VALIDATE_IP))
    {
        $ip = $forward;
    }
    else
    {
        $ip = $remote;
    }

    $ip_data = @json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip));

    if($ip_data && $ip_data->geoplugin_countryName != null)
    {
        $result = $ip_data->geoplugin_countryName;
    }

    return $result;
}


echo visitor_country(); // Output Coutry name [Ex: United States]

?>

Function Calls

getenv 1

Variables

None

Stats

MD5 d3bf4c56b3fc73048e2c85aef3b6f48a
Eval Count 0
Decode Time 81 ms