Geo Location extracted from visitors ip address

Νίκος Gr33k nikos at superhost.gr
Sun Jul 7 05:40:57 EDT 2013


Στις 6/7/2013 11:51 μμ, ο/η Νίκος Gr33k έγραψε:
> Στις 6/7/2013 11:32 μμ, ο/η Tim Chase έγραψε:
>> Can you be more specific please about using the aforementioned
>>> HTML5 location API ?
>> https://www.google.com/search?q=html5+location+api
>>
>> It's client-side JavaScript.
>
>
> so, i must edit my cgi script and do this:
>
> print '''
> <script>
> var x=document.getElementById("demo");
> function getLocation()
>    {
>    if (navigator.geolocation)
>      {
>      navigator.geolocation.getCurrentPosition(showPosition);
>      }
>    else{x.innerHTML="Geolocation is not supported by this browser.";}
>    }
> function showPosition(position)
>    {
>    x.innerHTML="Latitude: " + position.coords.latitude +
>    "<br>Longitude: " + position.coords.longitude;
>    }
> </script>
> '''
>
> Will that do the trick?
>
> but then again i want the city to be stored in the city variable.
> Somehow the above javascript code mu return me a value that i will the
> store at variable "city".
>
> I don't know how to do that.

I had a reply of another person telling me these:

Google, Facebook, Microsoft, Amazon and most other gigantic companies 
with lots of money track you in several different ways, not just by the 
IP. They compare several categories of tracking to generate a list of 
possible locations for you and then pick the one with the highest 
confidence.

For example, I have an AU phone. If I register with AU Cloud that also 
registers me with Google, and then my AU tower, IP and GPS location all 
get reported to Google. When I login later on a desktop to the same 
GoogleID account, they only have my IP and tracking cookies to look at, 
but they already know to check the latest location of my phone -- and 
whether its turned on/permitting GPS updates right then affects the 
confidence report % of that method of tracking. Recent reservations, 
dated product/service reviews, driving directions, map inquiries, map 
bookmarks/pins, etc. all give some confidence for frequented location 
and movement history each. Any billing relationship you have with them 
will give them another tracking point based on your billing address, and 
they can compare the billing address with frequented GPS locs, past 
shipping information and recent locale-oriented searches. The more 
recent the data and the more points of data match the same location the 
more confidence the potential location has.

...and so on.

Its pretty creepy, actually. Anyway, you can't just do this using IP 
information. To get reliable, live, pinpoint user location data you need 
to do one of:
Convince the user to report/register/pick their location
Convince the user to permit you to track their phone
Get a contract with Google that buys you their best guess at user location
Be like Google and engage in a conspiracy to invade the privacy of 
millions that dwarfs the resources of most intelligence agencies (and 
then sell it to intelligence agencies, just like Google does)


-- 
What is now proved was at first only imagined!



More information about the Python-list mailing list