Skip to main content
Inspiring
August 13, 2006
Question

IP Address to country

  • August 13, 2006
  • 4 replies
  • 737 views
Anybody know of a place I can pull this info from for free? Or is there a CF or even Perl script that will do this out there somewhere?

All I really need to know is if the IP is USA or not but I would love to be able to tell exactly where (down to just a city level) a person is connecting to my store front from.
This topic has been closed for replies.

4 replies

Inspiring
August 14, 2006
So is Google taking wild guesses for cities or do they know something we don't in their Google Analytics?
Inspiring
August 14, 2006
if you look at their data more closely you'll see that they will often miss more than they get (ie get country but not city).
Inspiring
August 14, 2006
I tried this one, it works if I just want the country, but if I try any of their other features it throws an error dealing with the results of the query.

http://www.hostip.info They got my country right but everything else wrong.
Inspiring
August 14, 2006
once you go below country level data, especially outside the US, accuracy starts to get "iffy". that's one reason why we stopped at country (though we do also try to guess locale as well).

as far as IPs go, we're only working w/what's available to cf via CGI vars. we don't do any tracing, etc. to figure out the end user's exact IP as more often than not it's still within that country (at least more than 90% of the time any way).
Inspiring
August 14, 2006
Not sure if this is exactly what you're after but, try http://www.sustainablegis.com/projects/geolocator/
It should return the country of origin for the IP address.
Inspiring
August 14, 2006
quote:

Originally posted by: xSeanx
Not sure if this is exactly what you're after but, try http://www.sustainablegis.com/projects/geolocator/
It should return the country of origin for the IP address.

These guys got my country right. They got the same ip address as the other sites. I suspect the ip address belongs to my isp.
Inspiring
August 14, 2006
I was curious about this so I googled ip address by country.

These guys, http://www.ip2location.com/, got my isp right and everything else wrong, including the country. Other sites all picked up the same ip address, which isn't mine.