/ Published in: PHP
Expand |
Embed | Plain Text
function getIpAddress() { // based on // http://stackoverflow.com/questions/527638/getting-the-client-ip-address-remote-addr-http-x-forwarded-for-what-else-could // http://www.grantburton.com/?p=97 'HTTP_CLIENT_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR', ); $ip = '0.0.0.0'; foreach ($check as $key) { break; } } return $ip; }
You need to login to post a comment.
