i have following php code to get vistor ip
function VisitorIP()
{
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$TheIp=$_SERVER['HTTP_X_FORWARDED_FOR'];
else $TheIp=$_SERVER['REMOTE_ADDR'];
return trim($TheIp);
}
$Users_IP_address = VisitorIP();
but every time i execute this script on my localhost i got ::1 as IP
how can i get exact internet IP & system IP address because my script will run on LAN nwteork and i want to record IP of lan pcs & internet IP and save it in mysql database.
i need PHP code which privide local system IP and system internet IP.
Thanks