Geolocation and GeoIP alternative

送分小仙女□ 提交于 2019-12-22 08:55:20

问题


What alternatives are there for GEOIP and HTML 5 Geolocation that are more accurate and are able to work reliably on BlackBerry browsers?


回答1:


You could look into IP2Location. However, if you're worried about accuracy, you shouldn't expect high percentages from free services. Even the pay services aren't heads and shoulders above the free ones and will always have < 100% accuracy. That's just the nature of the beast. I've heard many instances where folks inside the UK can't watch BBC online because their ip is incorrectly found to be outside of the country.

Some geo ip services: Akamai, Quova, Digital Envoy (digital element), Google (javascript), Maxmind (which you've used), hostip.info, Geobytes, ip2location, ip geo.




回答2:


If you are doing geo-location based on the IP address of the request coming in to your web server, it's not going to be accurate. Anyone using BIS to browse the web (i.e. any consumer device not on BES or Wi-Fi) is proxied through RIM's servers in Canada - so all requests will appear to be coming from Canada.




回答3:


The Geolocation API should be pretty accurate if you set enableHighAccuracy. It's still up to the browser and device to interpret that, though. Is this feature not available on the BlackBerry browser you're targetting? GPS can take a while to lock on to a satellite...have you tried using watchPosition() and just letting it run for awhile as a test?




回答4:


This works:

unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$_SERVER['REMOTE_ADDR']));


来源:https://stackoverflow.com/questions/4736661/geolocation-and-geoip-alternative

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!