100% found this document useful (1 vote)
160 views2 pages

IP2Location IP Country Region City Latitude Longitude ZIPCode Timezone Specification

The document describes the specifications of an IP to location database including the total number of records, fields, data formats available, and descriptions of each field including IP address, country, region, city, latitude, longitude, ZIP code and time zone.

Uploaded by

lgunityz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
160 views2 pages

IP2Location IP Country Region City Latitude Longitude ZIPCode Timezone Specification

The document describes the specifications of an IP to location database including the total number of records, fields, data formats available, and descriptions of each field including IP address, country, region, city, latitude, longitude, ZIP code and time zone.

Uploaded by

lgunityz
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

IP2LOCATION™ IP-COUNTRY-REGION-CITY-LATITUDE-

LONGITUDE-ZIPCODE-TIMEZONE DATABASE

DATA FILE SPECIFICATIONS

Product: IP2Location™ IP-Country-Region-City-Latitude-


Longitude-ZIPCode-Timezone Database [DB11]
File Name: IP2Location_IP_Country_Region_City_Latitude_
Latitude_ZIPCode_Timezone_Specification.PDF
Total Records: 2,286,053
Total Fields: 11
Last Updated: October 2006
Data Format Available: i. CSV [ Comma-Delimited ASCII ]
ii. BIN [ IP2Location™Binary Format ]

FIELD # FIELD NAME DATA TYPE FIELD DESCRIPTION


1 IP_FROM NUMERICAL Beginning of IP address range. The
1
(DOUBLE) data is represented in IP number
format.
2 IP_TO NUMERICAL Ending of IP address range. The
1
(DOUBLE) data is represented in IP number
format.
3 COUNTRY_CODE CHAR(2) Two-character country code based
on ISO 3166.
4 COUNTRY_NAME VARCHAR(64) Country name based on ISO 3166.
5 REGION VARCHAR(128) Region name.
6 CITY VARCHAR(128) City name.
7 LATITUDE NUMERICAL City latitude. Default to capital city
(DOUBLE) latitude if city is unknown.
8 LONGITUDE NUMERICAL City longitude. Default to capital
(DOUBLE) city longitude if city is unknown.
9 ZIPCODE CHAR(5) Five-digit ZIP codes for US cities
only.
10 TIME_ZONE VARCHAR(7) Time zone in UTC (Coordinated
Universal Time)
Note:
1
IP Address to IP Number Conversion

If the IP address 161.132.13.1, then the IP number is 2709785857.

IP Number, X = 161 x (256*256*256) + 132 x (256*256) + 13 x (256) + 1


= 2709785857

In general, this is the formula to convert an IP Address to IP Number.

Let assume the IP Address is A.B.C.D.

IP Number, X = A x (256*256*256) + B x (256*256) + C x 256 + D

2
Record Matching
First, convert the search IP Address to IP Number, X. Search a record that matches the range condition. You will get
only one match per query. The country, city and ISP information is attached to country fields of the record.

IP_FROM <= X <= IP_TO

You might also like