|
Posted by Rik on 08/16/07 18:53
On Thu, 16 Aug 2007 20:48:58 +0200, axlq <axlq@spamcop.net> wrote:
> Does anyone have a favored way of finding the geographic location
> of a user's IP address, so that a php script can include content
> relevant to that location?
>
> Reverse-lookup of the hostname isn't reliable and often doesn't
> work, especially if the returned hostname ends with .com, .net,
> .info, .biz or other tld that doesn't reveal geographic location.
>
> I also see a bunch of commercial services that offer a "country
> whois" function for a subscription fee. You'd think this sort of
> capability would be standardized by now.
Hardly. Giving out IP's has little to do with location. It's pretty hard
work keeping it up to date. There's hardly any chance of something really
reliable, and certainly not for free.
> Is anybody doing this? If so, how?
By using a database updated by a third party, with information more or
less accurate most of the time:
<http://www.maxmind.com/app/geolitecity>
--
Rik Wasmus
Navigation:
[Reply to this message]
|