<?php
function ipchecker() {
$http_client = $_SERVER['HTTP_CLIENT_IP'];
$http_x_forwarderd_for = $_SERVER['HTTP_X_FORWARDED_FOR'];
$http_remote_addr= $_SERVER['REMOTE_ADDR'];
if (!empty($http_client)) {
$ip_address=$http_client;
} else if (!empty($http_x_forwarderd_for)) {
$ip_address=$http_x_forwarderd_for;
} else if (!empty($http_remote_addr)) {
$ip_address= $http_remote_addr;
}
return $ip_address;
}
?>