<?php
function getRemoteIp()
{
$client_ip = ”;
if ( isset($_SERVER["REMOTE_ADDR"]) )
{
$client_ip = $_SERVER["REMOTE_ADDR"];
}
else if ( isset($_SERVER["HTTP_X_FORWARDED_FOR"]) )
{
$client_ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
}
else if ( isset($_SERVER["HTTP_CLIENT_IP"]) )
{
$client_ip = $_SERVER["HTTP_CLIENT_IP"];
}
return $client_ip;
}
?>