Destramic Posted May 31, 2015 Share Posted May 31, 2015 hey guys i've purchased geoip files from maxmind but as well as having the general blocks and locations for a ip address, it also has blocks and locations (city and country) files for ipv4 and ipv6 which look like this: blocks: network geoname_id registered_country_geoname_id represented_country_geoname_id is_anonymous_proxy is_satellite_provider 1.0.0.0/24 2077456 2077456 0 0 locations: geoname_id locale_code continent_code continent_name country_iso_code country_name 49518 en AF Africa RW Rwanda now using the stand blocks which are also downloadable i have no problem using and uploading to a database...but does anyone know how to use ipv4 and ipv6 blocks and location (city and country) files? and how they can be used with a ip in a sql query? i'm unable to find any tutorials about this unlike the general blocks and location. thanks guys Link to comment https://forums.phpfreaks.com/topic/296573-maxmind-ipv4-ipv6/ Share on other sites More sharing options...
Barand Posted May 31, 2015 Share Posted May 31, 2015 I am guessing your second helpful quote (locations) should look like this geoname_id | locale_code | continent_code | continent_name | country_iso_code | country_name 49518 | en | AF | Africa | RW | Rwanda but I had a problem deciphering the first (block) quote network | geoname_id | registered_country_geoname_id | represented_country_geoname_id | is_anonymous_proxy | is_satellite_provider 1.0.0.0/24 | 2077456 | 2077456 | 0 | 0 ?????? They do have "geoname_id" column in common (foreign key) Link to comment https://forums.phpfreaks.com/topic/296573-maxmind-ipv4-ipv6/#findComment-1512936 Share on other sites More sharing options...
Destramic Posted May 31, 2015 Author Share Posted May 31, 2015 blocks network 1.0.0.0/24 geoname_id 2077456 registered_country_geoname_id 2077456 represented_country_geoname_id null is_anonymous_proxy 0 is_satellite_provider 0 postal_code null latitude -27 longitude 133 locations geoname_id 1392 locale_code en continent_code AS continent_name Asia country_iso_code IR country_name Iran subdivision_1_iso_code 21 subdivision_1_name MÄzandarÄn subdivision_2_iso_code null subdivision_2_name Shahr city_name metro_code null time_zone Asia/Tehran sorry the preview looked good and i didnt check the final post...but here is a row from each file... Link to comment https://forums.phpfreaks.com/topic/296573-maxmind-ipv4-ipv6/#findComment-1512938 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.