Use the following Code to get geo location details based on Your IP $country data=getLocationInfoByIp(); echo $country data[‘country’]; echo $country data[‘city’]; function getLocationInfoByIp() { $current_ip = @$_SERVER[‘HTTP_CLIENT_IP’]; $forwardip = @$_SERVER[‘HTTP_X_FORWARDED_FOR’]; $remoteip = @$_SERVER[‘REMOTE_ADDR’]; $geo_data = array(‘country’=>”, ‘city’=>”); if(filter_var($current_ip, FILTER_VALIDATE_IP)) { $ipaddress = $current_ip; } elseif(filter_var($forwardip, FILTER_VALIDATE_IP)) { $ipaddress = $forwardip; } else { $ipaddress = $remoteip; }…