Looking up the location of an IP address

This review of perl modules for looking up the location of an IP address is now hosted elsewhere.

10 Comments

Hi Neil,

Thanks for reviewing IP::Info. I wish it didn't have any limitation on the number of IP lookup.

Mohammad S Anwar

This is a really interesting post - thanks for taking the time to put it together

Hi Neil

Congrats. This is a marvellous article.

If you have the energy, I'd like to see your code all wrapped up as a module, in the Benchmark::Featureset::* namespace.

That way you could include scripts to output the results as HTML, for instance.

I did this with Benchmark::Featureset::LocaleCountry. There results
are here.


I confess it's a lot of work, but you've done most of it.

Cheers
Ron

Interesting! But what about IP v6 addresses? They are rarely seen now, but if you decide on a system to geo-locate IP addresses now, I think you should seriously think about them.

Mind adding Geo::IPfree to the list?

"Web site localisation: automatically redirecting the user to the best default site, perhaps changing the language in the process."

I should point out if it wasn't already obvious that you should never infer language by source IP's country code.

Its woefully erroneous to assume all ( or even the majority ) of a population residing at a given country prefer to use the language you associate with that country.

For this purpose we have the "Accept-Language" browser header:


Accept-Language:en-nz,en-gb;q=0.8,en-au;q=0.6,en;q=0.4,en-us;q=0.2

And even then you probably should at least consider letting the user override that within your site.

My apologies if its deemed offensive if you already knew this, but I see people complain about this problem on a regular basis, and furtherment of the better way to do it is only good sense to me =).

I should point out if it wasn't already obvious that you should never infer language by source IP's country code.
A lot of websites do this though, including Google, YouTube, etc.
Its woefully erroneous to assume all ( or even the majority ) of a population residing at a given country prefer to use the language you associate with that country.
Maybe, but if one initially sends people everything in English and then expects them to pick out their language on a menu, at least half of the people will just leave your website and never come back, so the "assume language" bet is probably a better one.
For this purpose we have the "Accept-Language" browser header:
Again, sadly, this is ignored by Google, YouTube, etc. This header might have been a proposed way to solve the problem in the past, but unfortunately since it has not been adopted by the major players, it's not really a practical solution to the problem.

Since most people find web pages via search engines, it seems to me that the most sensible thing to do is to offer different language interfaces under distinct URLs, rather than offer a language-flipping menu which flips the language while keeping the URL the same.


Leave a comment

About Neil Bowers

user-pic Perl hacker since 1992.