Web Hosting Info

Search:

featured partner

The IP to Country Database

Handbook

Downloads
Last updated by jinesh on Fri, 01/05/2007 - 18:10
Download the latest IP-to-Country Database (Last updated on December 14 2010)

For more information on the database format and how to use it read the User's Guide.
    Comment viewing options:
    Select your preferred way to display the comments and click 'Save settings' to submit your changes.
    How often is the ip-to-country.csv.zip file updated
    Posted by jalanis on Tue, 05/11/2004 - 15:47.
    toaster42,

    hello, do you know how often is the ip-to-country.csv file updated???
    it's quite important jejeje thanks.

    jalanis
     
    Approximately one time per mo
    Posted by absolut on Wed, 09/08/2004 - 11:57.
    Approximately one time per month
     
    Where does one download the .csc.zip file?
    Posted by rxy122 on Tue, 01/18/2005 - 00:20.
    Does anyone have the link to download the ip-to-country.csv.zip file?
     
    Link for Zip
    Posted by carlpr on Fri, 01/21/2005 - 00:44.
    link at top of page!
    http://ip-to-country.webhosting.info/downloads/ip-to-country.csv.zip
     
    Lol :)
    Posted by rebel29270 on Thu, 05/05/2005 - 13:55.
    lol :)
     
    Hello
    Posted by rebel29270 on Thu, 05/05/2005 - 10:29.
    Hello I want to knwo if there is somewhere where we can subscribe to know when a new db update is aviable.

    THX
    Newsletter
    Posted by rebel29270 on Thu, 05/05/2005 - 10:39.
    Hello!

    I want to know if there is a news letter where you can subscribe ro know when there is new update on the ip list

    Thanks


    Rebel.
    Libya still Unknown Country !
    Posted by Mowaffak on Wed, 06/15/2005 - 07:57.
    Please can add new IP addresses for Libya to ip-to-country.csv:
    from 62.240.32.0 to 62.240.63.255 and decimal:
    from 1055924224 to 1055932415
    PHP/MySQL import scripts
    Posted by willem_spruijt on Thu, 08/18/2005 - 11:25.
    He Guys,
    Here's a good-working script for importing your csv-file into your database.

    http://willem.creationpoint.nl/ip2country/import_ip_to_country.phps
    Mysql vs db-files
    Posted by dupex on Sun, 09/04/2005 - 22:24.
    What is fastest?

    A mysql lookup,
    http://ip-to-country.webhosting.info/node/view/118

    or locally stored files like php.net have?
    http://www.php.net/source.php?url=/include/ip-to-country.inc

    tnx!
     
    How to use include/ip-to-country.inc
    Posted by method on Fri, 03/31/2006 - 18:39.
    hi dupex could u tell me how i can use
    http://www.php.net/source.php?url=/include/ip-to-country.inc

    i be happy if u show me how i can use it with php.thanks
    IP NUMBER FORMAT
    Posted by sivalee on Wed, 01/25/2006 - 09:04.
    Hi There,

    do any one knws why down loaded csv file contain ip range with out first two zero's example.

    "33996344","33996351","GB","GBR","UNITED KINGDOM"
    "50331648","69956103","US","USA","UNITED STATES"
    "69956104","69956111","BM","BMU","BERMUDA"

    But in the exmaple page (http://ip-to-country.webhosting.info/node/view/54) in the site it shows as

    "0033996344","0033996351","GB","GBR","UNITED KINGDOM"
    "0050331648","0083886079","US","USA","UNITED STATES"
    "0094585424","0094585439","SE","SWE","SWEDEN"

    Could you please tell me what is the correct format of above 2

    Cheers!
    Sivalee
    South Africa is missing?
    Posted by online chess on Fri, 02/03/2006 - 17:35.
    It appears South African IPs are mostly missing from the database. And it has been the case for quite some time now. Here's a few IPs that resolve to "some place we don't know", but should be assigned to "ZA":
    196.39.85.147
    196.23.43.3
    165.165.16.136

    ---
    online chess
    Parser3 operator for importing data in MySQL database
    Posted by redactor on Thu, 06/01/2006 - 14:29.
    @import_file[filename]
    ###
    ### Parser3 (http://www.parser.ru/en/)
    ### operator for importing IP-to-Country
    ### data into mysql
    ### (c) Redactor 2006
    ###
    ^if(!def $filename){

    $filename[ip-to-country.csv]

    }

    $incoming_csv[^table::load[nameless;temp/ip-to-country.csv;$.encloser["] $.separator[,]]]
    ^connect[mysql://root@localhost/iptoc] {
    ^void:sql{TRUNCATE mirr_iptoc}
    ^incoming_csv.menu{

    ^void:sql{INSERT
    INTO
    iptoc
    (ip_from,ip_to,country_code_2,country_code_3,country_name)
    VALUES
    ("$incoming_csv.0","$incoming_csv.1","$incoming_csv.2","$incoming_csv.3","$incoming_csv.4")
    }
    }
    }
    $result[done]
    Ip to city database
    Posted by kunwarbs on Wed, 08/23/2006 - 17:08.
    is there any database available to convert ip into CITY rather than country?
    A php script to convert csv to sql
    Posted by npelov on Tue, 08/29/2006 - 02:38.
    I wrote a little script to convert the csv file to sql import script: #!/bin/php
    $lines=file('ip-to-country.csv');
    foreach($lines as $line){
    $line=trim($line);
    if(!preg_match('/^"([0-9]+)","([0-9]+)","(.{2})","(.{3})","(.*)"$/',$line,$matches)){
    echo "error";
    }else{
    echo 'insert into ip2c values("'.($matches[1]).'","'.($matches[2]).'","'.($matches[3]).'","'.($matches[4]).'","'.($matches[5]).'");'."\n";
    }
    }
    ?>


    Usage:
    copy this script and .csv file in the same dir then run:
    convert.php >ip2c.sql


    Here is create table syntax:

    CREATE TABLE `ip2c` (
    `start` int(10) unsigned NOT NULL default '0',
    `end` int(10) unsigned NOT NULL default '0',
    `a2` char(2) NOT NULL default '',
    `a3` char(3) NOT NULL default '',
    `country` varchar(100) NOT NULL default '',
    PRIMARY KEY (`start`,`end`)
    );
     
    Cpanel blocking
    Posted by s_patd on Thu, 11/30/2006 - 20:48.
    Is there a way (maybe a plugin or something) to block all the people from one specific country from accesing your site from CPANEL? Or any other way, except from php or other onpage scripting. I mean blocking direct from the server?

    Thanks!
    ----------------------
    panic at the disco