Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Grant Edwards
On 2013-07-06, ?? Gr33k wrote: > 6/7/2013 4:41 , ??/?? ?? Gr33k : >> Yes i know iam only storing the ISP's city instead of visitor's homeland >> but this is the closest i can get: >> >> try: >>gi = pygeoip.GeoIP('/home/nikos/GeoLiteCity.dat') >>city

Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Grant Edwards
On 2013-07-06, ?? Gr33k wrote: > Yes i know iam only storing the ISP's city instead of visitor's homeland > but this is the closest i can get: > > try: >gi = pygeoip.GeoIP('/home/nikos/GeoLiteCity.dat') >city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] ) >host

Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Chris Angelico
On Sat, Jul 6, 2013 at 7:18 AM, Dave Angel wrote: > On 07/05/2013 04:44 PM, Tim Roberts wrote: >> >> ? Gr33k 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 uti

Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Support by Νίκος
Στις 5/7/2013 10:28 μμ, ο/η Jerry Hill έγραψε: On Fri, Jul 5, 2013 at 3:08 PM, Νίκος Gr33k 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? No, you'

Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Robert Kern
On 2013-07-06 09:41, Νίκος Gr33k wrote: Στις 6/7/2013 11:30 πμ, ο/η Chris Angelico έγραψε: On Sat, Jul 6, 2013 at 6:01 PM, � Gr33k wrote: Is there any way to pinpoint the visitor's exact location? Yes. You ask them to fill in a shipping address. They may still lie, or they may choose to

Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Jerry Hill
On Fri, Jul 5, 2013 at 3:08 PM, Νίκος Gr33k 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? No, you'd need to take the originating IP address a

Re: Geo Location extracted from visitors ip address

2013-07-08 Thread Joel Goldstick
On Fri, Jul 5, 2013 at 3:08 PM, Νίκος Gr33k 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? > > -- > What is now proved was at first only imagi

Re: Geo Location extracted from visitors ip address

2013-07-07 Thread Νίκος Gr33k
Στις 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 an

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Νίκος 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 ''' var x=document.getElementB

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Νίκος Gr33k
Στις 6/7/2013 11:33 μμ, ο/η Tim Chase έγραψε: Who controlls the script's privileges then? The process that calls the script file, i.e. Apache? Yes. When we run the python interpreter to run a python script like python metrites.py then out script will inherit the kind of access the python inte

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Tim Chase
On 2013-07-06 23:12, Νίκος Gr33k wrote: > I though that the ownership of the script file controlled the > privileges it runs under. Only if the script is SUID. In some environments, scripts can't be run SUID, only binaries. > Who controlls the script's privileges then? > The process that cal

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Tim Chase
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-s

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Νίκος Gr33k
Στις 6/7/2013 2:20 μμ, ο/η Tim Chase έγραψε: 1) using the aforementioned HTML5 location API, your device may be tattling on where you are. Are you browsing from a smart-phone or other device with a GPS built in? I'm using my lenovo laptop, by maps.gogole.com, fb and twitter have no problem pi

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Νίκος Gr33k
Στις 6/7/2013 5:43 μμ, ο/η Dennis Lee Bieber έγραψε: It was some guy form hostgator.com that had told me that a python script has the same level of access to anything on the filesystem as its coressponding user running it, implying that if i run it under user 'root' the python script could access

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Dave Angel
On 07/06/2013 04:41 AM, Νίκος Gr33k wrote: Στις 6/7/2013 11:30 πμ, ο/η Chris Angelico έγραψε: On Sat, Jul 6, 2013 at 6:01 PM, � Gr33k wrote: Is there any way to pinpoint the visitor's exact location? Yes. You ask them to fill in a shipping address. They may still lie, or they may choose

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Tim Chase
On 2013-07-06 11:41, Νίκος Gr33k wrote: > you know when i go to maps.google.com its always find my exact city > of location and not just say Europe/Athens. > > and twitter and facebook too both of them pinpoint my _exact_ > location. > > How are they able to do it? We need the same way. A couple

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Νίκος Gr33k
Στις 6/7/2013 11:30 πμ, ο/η Chris Angelico έγραψε: On Sat, Jul 6, 2013 at 6:01 PM, � Gr33k wrote: Is there any way to pinpoint the visitor's exact location? Yes. You ask them to fill in a shipping address. They may still lie, or they may choose to not answer, but that's the best you're go

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Chris Angelico
On Sat, Jul 6, 2013 at 6:01 PM, Νίκος Gr33k wrote: > Is there any way to pinpoint the visitor's exact location? Yes. You ask them to fill in a shipping address. They may still lie, or they may choose to not answer, but that's the best you're going to achieve without getting a wizard to cast Scryi

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Νίκος Gr33k
Στις 6/7/2013 4:41 πμ, ο/η Νίκος Gr33k έγραψε: Yes i know iam only storing the ISP's city instead of visitor's homeland but this is the closest i can get: try: gi = pygeoip.GeoIP('/home/nikos/GeoLiteCity.dat') city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] ) host = soc

Re: Geo Location extracted from visitors ip address

2013-07-06 Thread Νίκος Gr33k
Στις 6/7/2013 5:52 πμ, ο/η Dennis Lee Bieber έγραψε: On Sat, 06 Jul 2013 04:10:24 +0300, ? Gr33k declaimed the following: But he cgi scripts when running have full access to the server. No? or they only have the kind of access that their user has also? In any decent system, the

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Νίκος Gr33k
Yes i know iam only storing the ISP's city instead of visitor's homeland but this is the closest i can get: try: gi = pygeoip.GeoIP('/home/nikos/GeoLiteCity.dat') city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] ) host = socket.gethostbyaddr( os.environ['HTTP_CF_CONNECTING_

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Joel Goldstick
On Fri, Jul 5, 2013 at 9:10 PM, Νίκος Gr33k wrote: > Στις 6/7/2013 3:56 πμ, ο/η Joel Goldstick έγραψε: > >> >> Your code is not finding /root/GeoIPCity.dat because your directory has >> this file: GeoLiteCity.dat >> >> FileNotFoundError: [Errno 2] No such file or directory: >> '/root/GeoI

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Νίκος Gr33k
Στις 6/7/2013 3:56 πμ, ο/η Joel Goldstick έγραψε: Your code is not finding /root/GeoIPCity.dat because your directory has this file: GeoLiteCity.dat FileNotFoundError: [Errno 2] No such file or directory: '/root/GeoIPCity.dat' My mistake. Is there a differnce between GeoLiteCity.dat a

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Joel Goldstick
On Fri, Jul 5, 2013 at 8:08 PM, Νίκος Gr33k wrote: > Στις 6/7/2013 2:58 πμ, ο/η Νίκος Gr33k έγραψε: > > Στις 6/7/2013 2:55 πμ, ο/η Νίκος Gr33k έγραψε: >> >>> Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε: >>> On 2013-07-05 22:08, Νίκος Gr33k wrote: > Is there a way to extract out of

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Νίκος Gr33k
Στις 6/7/2013 2:58 πμ, ο/η Νίκος Gr33k έγραψε: Στις 6/7/2013 2:55 πμ, ο/η Νίκος Gr33k έγραψε: Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε: On 2013-07-05 22:08, Νίκος Gr33k wrote: Is there a way to extract out of some environmental variable the Geo location of the user being the city the user

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Νίκος Gr33k
Στις 6/7/2013 2:55 πμ, ο/η Νίκος Gr33k έγραψε: Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε: On 2013-07-05 22:08, Νίκος Gr33k 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 h

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Νίκος Gr33k
Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε: On 2013-07-05 22:08, Νίκος Gr33k 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? Yep. You can get an

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Grant Edwards
On 2013-07-05, ?? Gr33k 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? No. > Perhaps by utilizing his originated ip address? There is a very poor correlation between IP address and g

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Tim Chase
On 2013-07-05 22:59, Support by Νίκος wrote: > Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε: > > On 2013-07-05 22:08, Νίκος Gr33k 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? > >> > >

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Dave Angel
On 07/05/2013 04:44 PM, Tim Roberts wrote: ? Gr33k 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 r

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Tim Roberts
? Gr33k 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 addre

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Support by Νίκος
Στις 5/7/2013 10:58 μμ, ο/η Tim Chase έγραψε: On 2013-07-05 22:08, Νίκος Gr33k 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? Yep. You can get an

Re: Geo Location extracted from visitors ip address

2013-07-05 Thread Tim Chase
On 2013-07-05 22:08, Νίκος Gr33k 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? Yep. You can get an 11MB database (17MB uncompressed) http

Geo Location extracted from visitors ip address

2013-07-05 Thread Νίκος Gr33k
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? -- What is now proved was at first only imagined! -- http://mail.python.org/mailman/listinfo/python-list