Geo Location extracted from visitors ip address

Tim Chase python.list at tim.thechases.com
Sat Jul 6 16:32:07 EDT 2013


On 2013-07-06 23:14, Νίκος Gr33k wrote:
 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.

> Never heard of it. Can it be utilizized via a python cgi script?

Because it's client-side JavaScript, it runs, well, on the client's
browser.  Note that the user may be prompted regarding whether they
want to permit the website to access location information, so this
information may not be available.  If the user permits and JS is
enabled, the client-side JS code can then make AJAX requests (or stash
it in a cookie that gets sent with future requests) to convey the
location information to the server where your Python code is running.

-tkc





More information about the Python-list mailing list