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 54%Total: 3,997 All time: 779 This week: 267Up
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: 39
All time rank: 77023 in The Netherlands The Netherlands
Week rank: 517 Up16 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:3,997
This week:0
All time:779
This week:267Up
User Ratings User Comments (1)
 All time
Utility:77%StarStarStarStar
Consistency:79%StarStarStarStar
Documentation:-
Examples:84%StarStarStarStarStar
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:1912
  

For more information send a message to info at phpclasses dot org.