assimilation Posted May 26, 2010 Share Posted May 26, 2010 I'd like to detect which users of my website are coming from Ontario, which is the Canadian province that I live in. Does anyone know any free ways to do this? I'd like to send the Ontario users to a different output. Link to comment https://forums.phpfreaks.com/topic/202906-how-to-detect-a-visitors-geo-location/ Share on other sites More sharing options...
premiso Posted May 26, 2010 Share Posted May 26, 2010 You can do it by IP address. There should be a list of IP's that are used by Ontario somewhere and just check if they are from that IP. Link to comment https://forums.phpfreaks.com/topic/202906-how-to-detect-a-visitors-geo-location/#findComment-1063333 Share on other sites More sharing options...
teamatomic Posted May 26, 2010 Share Posted May 26, 2010 Use geolite, get the db here http://www.maxmind.com/app/geoip_country Then go here and get the file to access the db. http://geolite.maxmind.com/download/geoip/api/php/ Do a search here there are a few threads on installing and using it. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/202906-how-to-detect-a-visitors-geo-location/#findComment-1063356 Share on other sites More sharing options...
Bladescope Posted May 26, 2010 Share Posted May 26, 2010 Google Analytics is a great way of tracking hits to your website. Easy to use too, most websites use it including phpfreaks! Link to comment https://forums.phpfreaks.com/topic/202906-how-to-detect-a-visitors-geo-location/#findComment-1063367 Share on other sites More sharing options...
kenrbnsn Posted May 26, 2010 Share Posted May 26, 2010 But that's not what the OP asked. The OP wants to display a different page if the person hitting the site is coming from a particular place. Ken Link to comment https://forums.phpfreaks.com/topic/202906-how-to-detect-a-visitors-geo-location/#findComment-1063371 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.