PHP Classes
elePHPant
Icontem

IP to Country: Determine the country of a given IP address

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2004-02-03 (12 years ago) RSS 2.0 feedStarStarStarStar 63%Total: 9,115 This week: 1All time: 162 This week: 874Down
Version License Categories
ip2country 1.0Freely DistributableDatabases, Geography
Description Author

This class is meant to determine the country where is its located the Internet network given the IP address of computer.

The class uses a CSV file named ip-to-country.csv that lists the IP address ranges and the respective countries. That file can be obtained from from webhosting.info site .

The class can lookup the IP range CSV file or query in a mysql table that has the contents of CSV file for faster lookup.

Picture of Pascal Toussaint
Name: Pascal Toussaint <contact>
Classes: 6 packages by
Country: France France
Age: 50
All time rank: 797 in France France
Week rank: 728 Down28 in France France Down

Details
You need the latest version of ip-to-country.csv
Find it here :
http://ip-to-country.directi.com/downloads/ip-to-country.csv.zip
  Files folder image Files  
File Role Description
Plain text file class.ip2country.php Class the ip2country class
Accessible without login Plain text file readme Doc. readme file
Accessible without login Plain text file testclass.php Example Exemple

 Version Control Unique User Downloads Download Rankings  
 0%
Total:9,115
This week:1
All time:162
This week:874Down
User Ratings User Comments (1)
 All time
Utility:81%StarStarStarStarStar
Consistency:76%StarStarStarStar
Documentation:67%StarStarStarStar
Examples:76%StarStarStarStar
Tests:-
Videos:-
Overall:63%StarStarStarStar
Rank:726
 
not tested it completely yet.
7 years ago (Shahzad Malik)
40%StarStarStar