renu-86
02-21-2010, 12:24 PM
in my php page i have added code for getting IP
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
but i am not getting the real IP . HOW TO GET THE REAL IP ??
give me a solution..
i have got one more problem..
to get the system date and time .added the following
$date = date(' d/m/Y h:i:s A');
but the time am getting is 3 hours behind the system time , i need to get the system time , how??
suggestions plz...thank u..
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
but i am not getting the real IP . HOW TO GET THE REAL IP ??
give me a solution..
i have got one more problem..
to get the system date and time .added the following
$date = date(' d/m/Y h:i:s A');
but the time am getting is 3 hours behind the system time , i need to get the system time , how??
suggestions plz...thank u..