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.
Friendly correction to Noah's comment (Jun 3 at 7:57)--
Per MaxMind's client services department (emphasis mine): "IPv6 is currently NOT supported. At some time in the future, we do plan to implement it but we do not have a date at this time."