PHP programs to convert an IP Address into the Country Code
By swdeveloper on Sep 09, 2008
initdb.php: A php program to convert the text IP DB into mysql DB.
check.php: A php verifying program to dump all the stored records in mysql DB.
ip2c.php: A php program to convert IP address into country code from text DB. (slow version)
ip2c_db.php: A php program to convert IP address into country code from mysql DB. (fast version)
Here are the simple steps to run this program:
1. Make sure the included php.ini file in your current directory
-- It is needed to increase PHP program memory size
2. Put your input IP addresses in input.txt (one address one line)
-- See the example input.txt file
3. Run the program as: php ip2c.php [php ip2c_db.php]
4. The output will show both in screen and in output.txt file.
Enjoy using this package and let me know if you encounter any problem. If you think the package is helpful, you may find may other interesting and helpful tools at Sun Studio site.