See andmebaas pakub lahenduse mõne lihtsa sammuga mis tahes IP-aadressi päritoluriigi määramiseks. Esmalt hankige IP-aadress veebiserveri võrguprotokollist või serveripoolsest muutujast. Järgmisena tõlkige andmebaasi päringu kiirendamiseks IP-aadress kümnendvormingus IP-numbriks. Lõpuks otsige IP2-number andmebaasist IP2 tagasi, et täpset geograafilist asukohta tuvastada.
See on tasuta isiklikuks või äriliseks kasutamiseks, mille omistamiseks on vaja mainida nende andmete kasutamist järgmiselt,
Kui soovite suurt andmete täpsust, rohkem kirjeid ja kliendituge, hankige kommertsväljaanne. Lisateabe saamiseks külastage toodete võrdluslehte.
Let's explore this database which provides a valuable resource of geolocation data for free now!
Sign Up For FreeTõlgib IP-aadressi riigiks.
Praegune versioon | October 2024 |
---|---|
Järgmine värskendus | November 2024 |
IPv4 Andmebaasi suurus |
BIN: 2.42 MB CSV: 11.68 MB (251,470 Ridad) |
IPv6 Andmebaasi suurus |
BIN: 9.49 MB CSV: 48.02 MB (595,930 Ridad) |
Massiiv |
Binaarne (BIN)
ASCII tekstifail (CSV) |
Nimi | Tüüp | Kirjeldus |
---|---|---|
ip_from | INT (10)† / DECIMAL (39,0)†† | Esimene IP-aadress näitab võrgu blokeerimist. |
ip_to | INT (10)† / DECIMAL (39,0)†† | Viimane IP-aadress näitab võrgu blokeerimist. |
country_code | CHAR(2) | Kahekohaline riigikood, mis põhineb ISO 3166-l. |
country_name | VARCHAR(64) | Riigi nimi põhineb ISO 3166-l. |
† IPv4
†† IPv6
††† Latitude and Longitude are often near the center of population. These values are not precise and should not be used to identify a particular address or household.
Allpool on toodud sammud andmebaasi seadistamiseks nii IPv4 kui ka IPv6 andmete jaoks.
CREATE DATABASE ip2location;
USE ip2location;
CREATE TABLE `ip2location_db1`(
`ip_from` INT(10) UNSIGNED,
`ip_to` INT(10) UNSIGNED,
`country_code` CHAR(2),
`country_name` VARCHAR(64),
PRIMARY KEY (`ip_to`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
LOAD DATA LOCAL
INFILE 'IP2LOCATION-LITE-DB1.CSV'
INTO TABLE
`ip2location_db1`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;
CREATE DATABASE ip2location
GO
USE ip2location
GO
CREATE TABLE [ip2location].[dbo].[ip2location_db1](
[ip_from] bigint NOT NULL,
[ip_to] bigint NOT NULL,
[country_code] nvarchar(2) NOT NULL,
[country_name] nvarchar(64) NOT NULL
) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [ip_to] ON [ip2location].[dbo].[ip2location_db1]([ip_to]) ON [PRIMARY]
GO
BULK INSERT [ip2location].[dbo].[ip2location_db1]
FROM '{PATH TO IP2LOCATION-LITE-DB1.CSV}'
WITH
(
FORMATFILE = '{PATH TO DB1.FMT}'
)
GO
MÄRKUS. Peate kopeerima alloleva FMT-koodi ja salvestama selle arvutisse failina nimegaDB1.FMT.
12.0
5
1 SQLCHAR 0 1 "\"" 0 first_double_quote Latin1_General_CI_AI
2 SQLCHAR 0 20 "\",\"" 1 ip_from "",
3 SQLCHAR 0 20 "\",\"" 2 ip_to "",
4 SQLCHAR 0 2 "\",\"" 3 country_code Latin1_General_CI_AI,
5 SQLCHAR 0 64 "\",\"" 4 country_name Latin1_General_CI_AI
CREATE DATABASE ip2location WITH ENCODING 'UTF8';
\c ip2location
CREATE TABLE ip2location_db1(
ip_from bigint NOT NULL,
ip_to bigint NOT NULL,
country_code character(2) NOT NULL,
country_name character varying(64) NOT NULL,
CONSTRAINT ip2location_db1_pkey PRIMARY KEY (ip_from, ip_to)
);
COPY ip2location_db1 FROM 'IP2LOCATION-LITE-DB1.CSV' WITH CSV QUOTE AS '"';
mongoimport -u USERNAME -p PASSWORD --authenticationDatabase admin --drop --db ip2location --collection ip2location_db1 --type csv --file "IP2LOCATION-LITE-DB1.CSV" --fields ip_from,ip_to,country_code,country_name
CREATE DATABASE ip2location;
USE ip2location;
CREATE TABLE `ip2location_db1_ipv6`(
`ip_from` DECIMAL(39,0) UNSIGNED,
`ip_to` DECIMAL(39,0) UNSIGNED,
`country_code` CHAR(2),
`country_name` VARCHAR(64),
PRIMARY KEY (`ip_to`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
LOAD DATA LOCAL
INFILE 'IP2LOCATION-LITE-DB1.IPV6.CSV'
INTO TABLE
`ip2location_db1_ipv6`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;
CREATE DATABASE ip2location
GO
USE ip2location
GO
CREATE TABLE [ip2location].[dbo].[ip2location_db1_ipv6](
[ip_from] char(39) NOT NULL,
[ip_to] char(39) NOT NULL,
[country_code] nvarchar(2) NOT NULL,
[country_name] nvarchar(64) NOT NULL
) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [ip_to] ON [ip2location].[dbo].[ip2location_db1_ipv6]([ip_to]) ON [PRIMARY]
GO
BULK INSERT [ip2location].[dbo].[ip2location_db1_ipv6]
FROM '{PATH TO IP2LOCATION-LITE-DB1.IPV6.CSV}'
WITH
(
FORMATFILE = '{PATH TO DB1.FMT}'
)
GO
MÄRKUS. Peate kopeerima alloleva FMT-koodi ja salvestama selle arvutisse failina nimegaDB1.FMT. FMT-koodi esimene rida tähistab bcp versiooni. Palun muutke versiooni vastavalt teie installitud MS-SQL-ile.
12.0
5
1 SQLCHAR 0 1 "\"" 0 first_double_quote Latin1_General_CI_AI
2 SQLCHAR 0 39 "\",\"" 1 ip_from "",
3 SQLCHAR 0 39 "\",\"" 2 ip_to "",
4 SQLCHAR 0 2 "\",\"" 3 country_code Latin1_General_CI_AI,
5 SQLCHAR 0 64 "\",\"" 4 country_name Latin1_General_CI_AI
CREATE DATABASE ip2location WITH ENCODING 'UTF8';
\c ip2location
CREATE TABLE ip2location_db1_ipv6(
ip_from decimal(39,0) NOT NULL,
ip_to decimal(39,0) NOT NULL,
country_code character(2) NOT NULL,
country_name character varying(64) NOT NULL,
CONSTRAINT ip2location_db1_pkey PRIMARY KEY (ip_from, ip_to)
);
COPY ip2location_db1_ipv6 FROM 'IP2LOCATION-LITE-DB1.IPV6.CSV' WITH CSV QUOTE AS '"';
mongoimport -u USERNAME -p PASSWORD --authenticationDatabase admin --drop --db ip2location --collection ip2location_db1_ipv6 --type csv --file "IP2LOCATION-LITE-DB1.IPV6.CSV" --fields ip_from,ip_to,country_code,country_name
IP2Location pakub tasuta, eelkonfigureeritud ja töövalmis AMI-d ja pilte andmebaasi hõlpsaks seadistamiseks.
Meie LITE toodete tehniliste küsimuste / vastuste vaatamiseks külastage Stack Overflow.
Andmebaasi litsentsimise kohta lugege üldtingimusi.
Enhance your applications with essential geolocation data by using our FREE databases.