Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find users' location during a web site visit?

So, I want to be able to find the users location (even if it's only down to the city/town level), when they log onto the home page of my website. I figured this isn't impossible because Google seems to do it when you log on their main page, it seems to gear your search results toward your area, etc.

What would I look into to be able to do this?

like image 329
slandau Avatar asked Apr 01 '11 14:04

slandau


1 Answers

You can use GeoIP location services, who have various levels of accuracy. There may be other providers of IP-location databases too.

Another option is to try to use HTML5 location services, such as in http://html5demos.com/geo and http://dev.w3.org/geo/api/spec-source.html.

like image 168
Gnat Avatar answered Nov 16 '22 00:11

Gnat