PHP Classes

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

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 4,000 This week: 1All time: 785 This week: 560Up
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
Age: 42
All time rank: 77621 in The Netherlands The Netherlands
Week rank: 411 Up9 in The Netherlands The Netherlands Up

  Files folder image Files  
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.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,000
This week:1
All time:785
This week:560Up
User Ratings User Comments (1)
 All time
Utility:75%StarStarStarStar
Consistency:77%StarStarStarStar
Documentation:-
Examples:81%StarStarStarStarStar
Tests:-
Videos:-
Overall:53%StarStarStar
Rank:2177