PHP Classes

IP2More: Lookup the IP address of a country with ip2country

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 70%Total: 4,052 This week: 1All time: 769 This week: 560Up
Version License Categories
ip2more 1.0.0GNU General Publi...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: 43
All time rank: 1122 in Egypt Egypt
Week rank: 411 Down6 in Egypt Egypt Down
Innovation award
Innovation award
Nominee: 2x

Details

+-------------------------------------+ | IP2MORE :: IP2COUNTRY V3 | | http://www.SysTurn.com | +-------------------------------------+ IP2More It's a PHP class to simplify ip2country functions and also let you know more info about the IP address like Country, ISO2 Code, ISO3 Code, FIPS104 Code, ISO Number, Region, Capital, Currency, Currency Code and flag (small & big) If you also have registeration form (or similar forms) where user should select his country from list, ip2more class has a built-in function which will print dropdown list options and (optionaly) selects user's country based on his IP address The class doesn't need any database, as it depends on flat files which can be updated later easily and works very fast because it uses indexies in the search. Changes In V3: - If the IP address was not found in the local database, Its info will be fetched from Whois server. - A new function added "is_valid_ip": it will check the validity of the passed IP address - A new function added "find_country": This function was suggested by 'Nizam <info AT singlesburg DOT com>', 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 updted. thanks to 'Nizam <info AT singlesburg DOT com>' Bakr Alsharif bakr at systurn dot com

  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:4,052
This week:1
All time:769
This week:560Up
 User Ratings  
 
 All time
Utility:88%StarStarStarStarStar
Consistency:88%StarStarStarStarStar
Documentation:88%StarStarStarStarStar
Examples:90%StarStarStarStarStar
Tests:-
Videos:-
Overall:70%StarStarStarStar
Rank:236