Geo Location extracted from visitors ip address

Chris Angelico rosuav at gmail.com
Sat Jul 6 03:06:33 CEST 2013


On Sat, Jul 6, 2013 at 7:18 AM, Dave Angel <davea at davea.name> wrote:
> On 07/05/2013 04:44 PM, Tim Roberts wrote:
>>
>> ????? Gr33k <nikos at superhost.gr> wrote:
>>>
>>>
>>> Is there a way to extract out of some environmental variable the Geo
>>> location of the user being the city the user visits out website from?
>>>
>>> Perhaps by utilizing his originated ip address?
>>
>>
>> It is possible to look up the geographic region associated with a block of
>> IP addresses.  That does not necessarily bear any resemblence to the
>> actual
>> location of the user.  It tells you the location of the Internet provider
>> that registered the IP addresses.
>>
>
> To be more specific, the last time I checked, my IP address is registered to
> a location over 1000 miles away.  And it's not a dedicated IP address, so it
> could very well be used tomorrow by someone 200 nmiles the other side of the
> registered location.
>
> Further, I sometimes use other ISP's with different addresses, even when I
> don't leave the house.  And once I leave, anything's possible.

That said, though, geolocation is usually accurate enough to report
which country you're in. For basic statistical analysis, that's
generally sufficient.

ChrisA



More information about the Python-list mailing list