I've been using an IPv4 to country convertor successfully. eg: get IP of machine and compare to table to get country.
I'm updating this currently and with IPv6 around the corner I wanted to ask if there is a solution for converting IPv6 to country?
Note: preference for PHP and MySQL
thx
Maxmind have support for IPv6 in their GeoIP Country database.
If you're OK with using a web service then my service http://ipinfo.io recently added IPv6 support:
You can either parse the JSON response to get the country, or add country to the URL:
See http://ipinfo.io/developers for more details.
Here's an example with https://ipdata.co
Which gives