Вы находитесь на странице: 1из 2

IP2LOCATION™ IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE- TIMEZONE-NETSPEED-WEATHER DATABASE

 

DATA FILE SPECIFICATIONS

Product:

IP2Location™ IP-Country-Region-City-Latitude-Longitude- Timezone-Netspeed-Weather Database [DB17]

File Name:

IP2Location_IP_Country_Region_City_Latitude_

Latitude_Timezone_Netspeed_Weather_Specification.PDF

Total Records:

3,026,303

Total Fields:

12

Last Updated:

February 2009

Data Format Available:

i. [ Comma-Delimited ASCII ]

CSV

ii. [ IP2Location™Binary Format ]

BIN

FIELD #

FIELD NAME

DATA TYPE

FIELD DESCRIPTION

1

IP_FROM

NUMERICAL

Beginning of IP address range. The data is represented in IP number 1 format.

(DOUBLE)

2

IP_TO

NUMERICAL

Ending of IP address range. The data is represented in IP number 1 format.

(DOUBLE)

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 latitude if city is unknown.

(DOUBLE)

8

LONGITUDE

NUMERICAL

City longitude. Default to capital city longitude if city is unknown.

(DOUBLE)

9

TIME_ZONE

VARCHAR(7)

Time zone in UTC (Coordinated Universal Time)

10

NETSPEED

VARCHAR(10)

Internet Connection Speed (DIAL) DIAL-UP, (DSL) DSL/CABLE or (COMP) COMPANY

11

WEATHER_

VARCHAR(10)

The special code to identify the nearest weather observation station.

STATION_CODE

12

WEATHER_

VARCHAR(128)

The name of the nearest weather observation station.

STATION_NAME

Copyright © 2002-2009 IP2Location.com. All Rights Reserved.

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

Copyright © 2002-2009 IP2Location.com. All Rights Reserved.