We've got a requirement in a couple of our systems to detect a user's country based on their IP address. We'd prefer to use a database rather than a Web Service (to prevent issues with downtime/network access to an externally hosted service) so I'm looking for recommendations, anyone got any good or bad stories of the various IP to Country databases?
What I've found from google:
Paid
- Maxmind - $50, then $12 a month, site license
- IP2Location - $50 a year, single server
- software77 (Donationware)
Free
Any information on how the free ones compare to the paid ones would be good. Right now I'm leaning towards Maxmind's paid service since it includes automatic updates that we can run via script once a week.
We use Maxmind and it's very good, and pretty accurate. You can get scenarios where, say, a German company has offices in the US but is using a German IP range for internal purposes. So, they'll report as Germany while being based in the US. It won't be 100% reliable.
Totally free, LGPL, not easily found in google: ip2c.org
来源:https://stackoverflow.com/questions/19514749/best-ip-to-country-database