Sample PHP
function GetIpAddress(){ $ip = ''; if(!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; }else if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip = $_SERVER['REMOTE_ADDR']; } return $ip; }
RT @CodeSnippetsNET: How to get the IPAddress in #PHP http://t.co/aNVLBavaPy #html #js #javascript #css #jquery #programming
RT @CodeSnippetsNET: How to get the IPAddress in #PHP http://t.co/aNVLBavaPy #html #js #javascript #css #jquery #programming