Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Geolocation without HTML5 API

All!

I need to determine current user City. With HTML5 it's not a problem. But i need support old browsers (leke are ie 7,8). First of all i thought to find location using IP address. But its not easy to implement (i need actual database with location). Free web services not provide me needed info. Many of these can determine a country (but not city).

I tried to use http://www.geoplugin.net/ and this service return only Country (as and another free). I tried to use CSV database with IPs (but in the internet i can find old version).

Do you know free ways to determine user City? Thanks!


1 Answers

Some older browsers do have some support for getting the user location in some form. Back in the IE7/8 days a few different browsers handled geolocation in different ways. This was a pain for developers. I can't for the life of me remember how to do this in IE7/8 but do remember writing a wrapper library for this at some point. Now a days most people use wrapper libraries that handle all the different browser implementations for them. The Bing Maps V7 JavaScript wraps all the old and new functionalities into a common GeoLocationProvider class in their API which might be an option if you need a map in your site: http://msdn.microsoft.com/en-us/library/hh125833.aspx

like image 99
rbrundritt Avatar answered Jun 18 '26 01:06

rbrundritt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!