This is free software you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This software is copyright (c) 2013 - 2019 by MaxMind, Inc. This attribute is returned by all end points.
See GeoIP2::WebService::Client for a list of the possible locale codes. This returns a hash reference where the keys are locale codes and the values are names. If the record does not have a name in any of the locales you asked for, this method returns undef. This will be passed through from the GeoIP2::WebService::Client object you used to fetch the data that populated this record. The locale chosen depends on the locales argument that was passed to the record's constructor.
This returns the two-character ISO 3166-1 ( ) alpha code for the country. This attribute is available from all web service end points and the GeoIP2 Country, City, and Enterprise databases. This returns a true value if the country is a member state of the European Union and a false value otherwise.
This returns a geoname_id for the country. This attribute is only available from the Insights end point and the GeoIP2 Enterprise database. This returns a value from 0-100 indicating MaxMind's confidence that the country is correct. This class provides the following methods: $country_rec->confidence() This record is returned by all the end points. This class contains the country-level data associated with an IP address. Print $country_rec->name(), "\n" DESCRIPTION My $client = GeoIP2::WebService::Client->new( just change the 'E:\\PROJECT\\GeoIPCountryWhois.csv' with : '/home/admin/GeoIPCountryWhois.GeoIP2::Record::Country - Contains data for the country record associated with an IP address VERSION example if you have on linux os, and your file of GeoIPCountryWhois.csv, is on /home/admin/ directory you must fill with double backslash on the file structures like
if on windows the directory separator is backslash, so. please change the 'E:\\PROJECT\\GeoIPCountryWhois.csv' with your path of the GEOLITE COuntry CSV file. `maxmind_ipstart `, `maxmind_ipend `, `maxmind_locid_start `, `maxmind_locid_end `, `maxmind_country_code `, `maxmind_country ` LOAD DATA INFILE 'E: \\PROJECT \\GeoIPCountryWhois.csv ' INTO TABLE `Maxmind_geoIP ` FIELDS TERMINATED BY ', ' ENCLOSED BY '" ' ESCAPED BY ' \\ ' LINES TERMINATED BY ' \n '( ) DEFAULT CHARSET =UTF8 COLLATE =UTF8_GENERAL_CI AUTO_INCREMENT = 1 PRIMARY KEY( `id `, `maxmind_ipstart `, `maxmind_ipend `, `maxmind_locid_end `, `maxmind_country ` ) `maxmind_country ` VARCHAR( 100) COLLATE UTF8_GENERAL_CI NOT NULL, - the country name `maxmind_country_code ` VARCHAR( 4) COLLATE UTF8_GENERAL_CI NOT NULL, - the country code `maxmind_locid_end ` INT( 1) UNSIGNED ZEROFILL NOT NULL, - the end of maxmind location id `maxmind_locid_start ` INT( 1) UNSIGNED ZEROFILL NOT NULL, - the start of maxmind location id `maxmind_ipend ` VARCHAR( 50) COLLATE UTF8_GENERAL_CI NOT NULL, - the ip end of maxmind data `maxmind_ipstart ` VARCHAR( 50) COLLATE UTF8_GENERAL_CI NOT NULL, - the ip start from maxmind data `id ` INT( 1) UNSIGNED ZEROFILL NOT NULL AUTO_INCREMENT, - the id just for numeric
Table structure for table `Maxmind_geoIP`ĬREATE TABLE IF NOT EXISTS `Maxmind_geoIP ` ( choose the CSV / zip, and extract it on your Computer drive
first! we must download the csv format on maxmind developer site : Country City: continentcode: string (2) The continent code for this location. This will always correspond to the locale name of the file. this sql is for importing the MaxminD GeoLite Country to mysql data Country City: localecode: string: The locale that the names in this row are in. please do this on your localhost first before ypu test on your server this sql structure is for knowledgebase or educational only.