Login   Register  
PHP Classes
elePHPant
Icontem

IP2More: Lookup the IP address of a country with ip2country

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2005-09-15 (9 years ago) RSS 2.0 feedStarStarStarStar 77%Total: 3,959 This week: 2All time: 732 This week: 666Up
Version License Categories  
ip2more 1.0GNU General Public Lice...Networking, Geography
Description Author  

This class can lookup related information of the country of the network of a given IP address.

It does not need an SQL database server as it uses the ip2country flat file databases to lookup the the IP country and other details like the country ISO 2 and 3 letter codes, FIPS104 code, ISO number, region, capital, currency name and code and flags.

The class can also generate select inputs for choosing a country in Web forms. The select input default country can optionally be set to the country of a the user's IP address.

New In v3.0:
- If the IP address was not found in the local database, Its info will be fetched from Whois server.
- A new function added "find_country": This function was suggested by 'Nizam', It will find a country by providing any info about it (name, iso2, iso3, fips104 OR even the Capital)
- The fips104 field in countries list, was updated. thanks to 'Nizam'
- A new function added "is_valid_ip": it will check the validity of the passed IP address


Note:
You can change the WHOIS service to any other one you might know.
But if you did so, don't forget to change the $whois_regex and $whois_return.
(Till I finish documentations you will find detailed comments in i2m.class.php)

Picture of Bakr Alsharif
Name: Bakr Alsharif <contact>
Classes: 4 packages by
Country: Egypt Egypt
Age: 34
All time rank: 1141 in Egypt Egypt
Week rank: 128 Down3 in Egypt Egypt Down
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file demo.php Example Example
Plain text file i2m.class.php Class ip2more base class
Accessible without login Plain text file license.txt Lic. License
Accessible without login Plain text file readme.txt Doc. READ ME

 Version Control Unique User Downloads Download Rankings  
 0%Total:3,959All time:732
 This week:2This week:666Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:90%StarStarStarStarStar
Documentation:90%StarStarStarStarStar
Examples:93%StarStarStarStarStar
Tests:-
Videos:-
Overall:77%StarStarStarStar
Rank:27