PHP Classes

GeoLocation: Get the location of an IP address with the hostip

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 4,002 All time: 785 This week: 59Up
Version License PHP version Categories
geolocation 0.2BSD License4.2Web services, Geography
Description 

Author

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.

Picture of Jillis ter Hove
Name: Jillis ter Hove <contact>
Classes: 1 package by
Country: The Netherlands The Netherlands

  Files folder image Files (3)  
File Role Description
Plain text file GeoLocation.class.php Class Main class file
Accessible without login Plain text file index.php Example Example usage of the class
Accessible without login Plain text file PHP45.XML.php Aux. Wrapper for differences in XML handling in php 4 and php 5.

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,002
This week:0
All time:785
This week:59Up
User Ratings User Comments (1)
 All time
Utility:75%StarStarStarStar
Consistency:77%StarStarStarStar
Documentation:-
Examples:81%StarStarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:2223