[Gllug] Geolocation

Jason Clifford jason at ukfsn.org
Sat Feb 11 13:52:55 UTC 2012


On Sat, 2012-02-11 at 13:04 +0000, Tethys . wrote:
> Does anyone know of a decent geolocation solution under Linux? I'm not
> looking for massive accuracy. Being able to narrow an IP address down
> to a country[1] would be good enough. My current solution is both
> hacky and slow and involves making a half hearted attempt to parse the
> output of whois(1). If someone's already done the work, I'd rather not
> be reinventing the wheel. There used to be a registry of address
> blocks at ipindex.net, but that's been down for a while.

How do you want to use it? In a script/program of some kind?

If so check the public repo libraries for the language you are using and
you'll probably find a library or module that does what you want.

I use IP::Country::Fast in perl to get a handle on what country a given
IP is located in. Currently I only do so in order to redirect attempts
from Nigeria to register with my services to a suitable website.

--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list