The IP-to-Country Database and Tools can be used for:* Real Time Geo-Locating (Country)* Provide Location Aware Content (language, currency,...
Code:
http://rapidshare.com/files/90797186/ip-to-country.csv.zip
You can either import this CSV file into a database (recommended) or search the file itself (VERY slow).If you have PHPmyadmin installed on your server, use the "Import" feature and choose CSV file, you need to create the tables first though.Here is the SQL query to create the database:
Code:
CREATE DATABASE iptocountry;CREATE TABLE IF NOT EXISTS `iptocountry` (`start` int(11) unsigned NOT NULL,`end` int(11) unsigned NOT NULL,`shortcode` char(2) NOT NULL,`longcode` char(3) NOT NULL,`country` varchar(255) NOT NULL,KEY `start` (`start`,`end`)) ENGINE=MyISAM COMMENT='IP to country';Import the CSV file (via PhpMyAdmin) using these settings:Fields terminated by: ,Fields enclosed by: "Fields escaped by: \Lines terminated by: auto
No comments
Post a Comment