Web site developers - 584 Part IV: Using PHP for Sysadmin Tasks
584 Part IV: Using PHP for Sysadmin Tasks This class uses The Internet Geographic Database, which maps IP addresses to physical world locations. To learn more about this, visit http://www.caida.org/ tools/utilities/netgeo. Listing 16-9 shows the geolocator.php script. Listing 16-9: geolocator.php #!/usr/bin/php -q GetAddressLocation($hostname,$location)) { // Set longitude and latitude from retrieved data $longitude=doubleval($location[ LONG ]); $latitude=doubleval($location[ LAT ]);