Web Hosting Talk







View Full Version : Lookup IP range by country?


sej7278
06-10-2003, 07:37 PM
Does anyone know a way of finding the country a site visitor comes from?

I can only think of getting the IP, then looking up the owner of the range, then from that, find the registry of the IP range (RIPE/ARIN etc.) then country from that - probably take at least 3 WHOIS calls....

Is there a service, that I can use to do this, or a script?

Traceroute and reverse DNS lookup wouldn't work either.....

Is there a basic regional database that says e.g. China is 123.33.xxx.xxx, America is 12.235.xxx.xxx that I could just store as a flat file on my server?

hostpc.com
06-10-2003, 07:46 PM
How about geo_ip - if you're a web host/admin you can install this fairly useful RPM ...

Other than that, I'm out of ideas, sorry.

sej7278
06-10-2003, 08:04 PM
Where's that from then - what does it do?

I have root on the server yes, not Linux, but Solaris....

hostpc.com
06-10-2003, 08:07 PM
http://search.cpan.org/author/TJMATHER/Geo-IP-PurePerl-1.10/

Not the EASIEST thing to get running, but it does a great job telling you where the IP's assigned.

amzhost
06-10-2003, 08:12 PM
http://www.activetarget.com/
http://www.ip2location.com/
http://www.maxmind.com/

i used to have a nice list of country ip from CIA, but i lost it :(