Î
Îικόλας
Hello, iam still looking for a way to identify the city of my website
visitors.
The closet i have gone is to come up with the visitor's ISP city:
try:
gi = pygeoip.GeoIP('/usr/local/share/GeoLiteCity.dat')
city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] )
host = socket.gethostbyaddr( os.environ['HTTP_CF_CONNECTING_IP'] )[0]
except Exception as e:
host = repr(e)
But today i was searching again for this and found out about geoip2,
maybe that would help more.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'geoip2'
I cant even import the module even though my 'pip install geopip2' was
successful
There is definately i way to identify the users location based solely on
its ip address as this site does it: http://www.geoiptool.com/
Google, MS, facebook and twitter are not the only ones that can do it?
Perhaps this is being done by giving longitude and latitude?
visitors.
The closet i have gone is to come up with the visitor's ISP city:
try:
gi = pygeoip.GeoIP('/usr/local/share/GeoLiteCity.dat')
city = gi.time_zone_by_addr( os.environ['HTTP_CF_CONNECTING_IP'] )
host = socket.gethostbyaddr( os.environ['HTTP_CF_CONNECTING_IP'] )[0]
except Exception as e:
host = repr(e)
But today i was searching again for this and found out about geoip2,
maybe that would help more.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'geoip2'
I cant even import the module even though my 'pip install geopip2' was
successful
There is definately i way to identify the users location based solely on
its ip address as this site does it: http://www.geoiptool.com/
Google, MS, facebook and twitter are not the only ones that can do it?
Perhaps this is being done by giving longitude and latitude?