Getting visitors country from their IP

i want to get visitors country via their IP…
right now I’m using this (
here’s my code

if (isset($_SERVER['HTTP_CLIENT_IP'])) {$real_ip_adress=$_SERVER['HTTP_CLIENT_IP'];}
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {$real_ip_adress=$_SERVER['HTTP_X_FORWARDED_FOR'];}
else {$real_ip_adress=$_SERVER['REMOTE_ADDR'];}

well, it’s working properly…
but, the thing is: the country i get is actually country code like US or CA
and i want the whole country name like United States or Canada
[*]so, is there any good alternative to offers this?

i know that i can just write some code that will eventually turn this two letters to whole country name
but i’m just too lazy to write a code that contains all countries…

P.S: for some reason i don’t want to use any ready made CSV file or any code that will grab this information for me… like ip2country ready made code and CSV

Have a look at the following service, it was only a quick search but it looks very promising.

If you use their url, you can get the country_name. You will need to run it through json_decode() so it builds an object you can utilize in PHP, but that shouldn’t be too difficult.