IP Address Country Database - Geo-targeting IP Address to Country

Products
· IP-Country Database
· IP-Country-Region Database
· IP to City Database
· IP-Country-ISP Database
· IP-Country-Region-City-ISP
· Target Country by IP Address

Home
Purchase

  IP Address Country Database   IP Address Country mapping Database  

Frequently Asked Questions

How often is the IP Address Country database updated?
The IP Address Country database is updated every month. About 1% of the database changes every month.

How many IP addresses are in your IP Address Country database? How many countries are included?
Please see our Technical Details page.

How accurate is your IP Address Country database?
The IP Address Country database is about 98% accurate.

What is the IP Address Country database format?
The database format is known as Comma Separated Values (CSV). All fields are separated by a comma and each individual line is a record by itself.

Would it be possible to receive the IP Address Country database as a mysql dump file instead of the CSV file?
You can receive the IP Address Country database as a mysql dump file instead of the CSV file.

What is the definition of each column in the table?

FieldData TypeField Description
Start IP Address varchar(15)First IP address in netblock
End IP Address varchar(15)Last IP address in netblock
Start IP NumberDouble First IP address in netblock, IP Number
End IP NumberDouble Last IP address in netblock, IP Number
Country Codechar(2) ISO 3166 Country Code
Country Namevarchar(50) The name of the country

What is the size of the IP Address Country database?
The March 2005 CSV file is 5.58 Megabytes.

How much of the IP Address space do you cover?
We cover all of the IPv4 space, including all publically available IP addresses.

How do I convert a IP Address to a IP Number?

IP address (IPV4) is divided into 4 sub-blocks. Each sub-block has a different weight number each powered by 256.
Beginning IP number and Ending IP Number are calcuated as follows:
IP Number = 16777216*w + 65536*x + 256*y + z
where IP Address = w.x.y.z

PHP Function To Convert IP Address to IP Number
-----------------------------------------------
function Dot2LongIP ($IPaddr)
{
if ($IPaddr == "") {
return 0;
} else {
$ips = split ("\.", "$IPaddr");
return ($ips[3] + $ips[2] * 256 + $ips[1] * 65536 + $ips[0]
*16777216); }
}

ASP Function To Convert IP Address to IP Number
-----------------------------------------------
Function Dot2LongIP (ByVal DottedIP)
Dim i, pos
Dim PrevPos, num
If DottedIP = "" Then
Dot2LongIP = 0
Else
For i = 1 To 4
pos = InStr(PrevPos + 1, DottedIP, ".", 1)
If i = 4 Then
pos = Len(DottedIP) + 1
End If
num = Int(Mid(DottedIP, PrevPos + 1, pos - PrevPos - 1))
PrevPos = pos
Dot2LongIP = ((num Mod 256) * (256 ^ (4 - i))) + Dot2LongIP
Next
End If
End Function

How do I use the IP-Country database?
First, import the IP-Country database into your MS-SQL, MS-ACCESS, PL/SQL, MySQL database and etc. Then, write a query to get a recordset.

Example of SQL Query
====================
SELECT [COUNTRY NAME COLUMN] FROM [IP-COUNTRY TABLE] WHERE
[SEARCH IP ADDRESS NO] BETWEEN [IP ADDRESS FROM COLUMN] AND [IP ADDRESS TO COLUMN]

Are the monthly update a complete set of all entries or only a part of all IP-Addresses ?
The monthly update are a complete set of all entrie.

How do you dispatch the montly updates? By e-mail, regular mail,downloadable?
Downloadable.

 If you have a question that is not answered here, please e-mail it to techsupport@ip2country.net.

Copyright ©2001-2013 IP2Country.net . All rights reserved.