Getting visitors country from their IP

I want to get visitors country via their IP… Right now I’m using this (http://api.hostip.info/country.php?ip=…… ) Here is my code: <?php if (isset($_SERVER[‘HTTP_CLIENT_IP’])) { $real_ip_adress = $_SERVER[‘HTTP_CLIENT_IP’]; } if (isset($_SERVER[‘HTTP_X_FORWARDED_FOR’])) { $real_ip_adress = $_SERVER[‘HTTP_X_FORWARDED_FOR’]; } else { $real_ip_adress = $_SERVER[‘REMOTE_ADDR’]; } $cip = $real_ip_adress; $iptolocation = ‘http://api.hostip.info/country.php?ip=’ . $cip; $creatorlocation = file_get_contents($iptolocation); ?> Well, it’s … Read more