Review Request: Patch to use the iplocationtools.com geolocation service (lat/long information, bigger database)

Sebastian Kügler sebas at kde.org
Mon Apr 27 12:14:43 CEST 2009


On Tuesday 14 April 2009 12:43:14 Andrew Coles wrote:
> Patch to use the iplocationtools.com geolocation service with the
> geolocation DataEngine.  Motivation is two-fold:
>
>  i) Better database (selfishly, it now works for me ;) )
> ii) Service returns latitude/longitude information - just as the GPS
> back-end does - so anything using geolocation has a common denominator to
> work with, rather than GPS returning lat/long and IP returning a place
> name.

I've been using the geolocation dataengine for a while in one of my projects 
now, and indeed after the switch to iplocationtools.com is started working 
beautifully here.

After using it a bit however, I found that there's a bottleneck as 
whatismyip.com is often unreachable, making the whole thing break (cannot 
retrieve IP -> cannot retrieve location). Now getting the 'public' IP cannot 
be that hard -- it's encoded in every HTTP request, so I wonder if you know a 
better way for this?

The nicest solution would be of course to just query iplocationtools.com with 
"my current IP whatever", but for that, iplocationtools would need some kind 
of API to extract the current IP from the HTTP request. Which it doesn't have 
as far as I can see.

(For the casual reader: The dataengine currently queries the website 
whatismyip.com to find out the publically visible IP of a user and then uses 
that result to query iplocationtools, which returns a location for a given 
IP.)

Any ideas how to get around this? Maybe using a more reliable service short-
term, and get in contact with iplocationtools to add an API call for "my 
current IP"?
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 



More information about the Plasma-devel mailing list