I am looking at trying to access the country the user is accessing my site from e.g. France, Uk etc... and am looking at the best possible and most accurate way to achieve this.
I started on this problem by using $locale = new Zend_Locale(Zend_Locale::BROWSER); but that gave me en_US. Im in the UK using a virtual host (I have read up on the Zend_Locale function and now understand the reason it returns this result). I have considered some sort of HTML5 geolocation option, but if the user has javascript turned off, i'm assuming it wont work and as you can probably tell from that last comment, my Javascript is non-existent so I think thats not an option (short of spending the next few weeks or months learning a new language).
Finally I was considering using $_SERVER['REMOTE_ADDR']; then comparing the returned Ip address with some free service. However I was wondering if there is a better way in Magento, or if this way is accurate enough?
It is not vitally important that it is correct 100% of the time, however it would be nice if I can get it close to that.