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'];
?>
Dennis Chen Manager of Tools & Integration, Potix Corporation. Formerly technical leader & special lecturer at Infinities Soft Inc & engineer at III. 11+ years experiences in Java/J2EE solutions 3+ years BPM/SOA system & Ajax/Web2.0 applications. He is also one of the original developers of ZK Spreadsheet, ZK Studio (an Eclipse-Plugin for ZK framework) & […]