I\'m working on an IP geolocation library that uses the first three octets of an IPv4 address to determine a user\'s country, city, lat, lon, etc. Works like a charm.
Bu
maxmind.com's geolocation services and libraries handle IPv6 OK. Maybe their stuff is an option for you. (I don't have any affiliation with them.)