This class can be used to determine the geographic location of an IP address using the hostip.info Web services.
The class is guaranteed to work with PHP version 4.2 and PHP 5.2. There is some important information in the index.php file that gives hints to troubleshoot problems.
It accesses the hostip.info Web services API site passing a given host IP address as query parameter.
The class retrieves and parses the response to return the country, the city, and the latitude and longitude coordinates of the specified host. |