Other ways to get the location of the visitor on your site?
I have tried HTML 5 geolocation,GEOIP and many other services.But it is开发者_运维知识库 still not good.Even I only need to get the country of the visitors.
IMO the best way is to use GEOIP, you can also get the free city database if you want to drill down the location further. I wrote a simple class that works with apache's mod_geoip as well as instructions on how to install the module and geoip databases. It's on GitHub if you want to take a look.
精彩评论