Note that CAIDA NetGeo is no longer active and its database is not accurate (could be very inaccurate!).
echo("Your IP is $ip, resolved hostname is $hostname “);
echo(“and NetGeo, a public database that associates IP addresses to geographical information, “);
echo(“gives the following details:
echo(“Courtesy of caida.org“);
TARGET: 67.180.238.xx NAME: IANA-NETBLOCK-67 NUMBER: 18.104.22.168 - 22.214.171.124 CITY: STATE: COUNTRY: AU LAT: -25.00 LONG: 135.00 LAT_LONG_GRAN: Country LAST_UPDATED: NIC: APNIC LOOKUP_TYPE: Block Allocation RATING: DOMAIN_GUESS: apnic.net STATUS: OK