chrislim2888 / IP2Location-C-Library

IP2Location C library enables the user to find the country, region, city, coordinates, zip code, time zone, ISP, domain name, connection type, area code, weather station code, weather station name, mobile, usage types, etc that any IP address or hostname originates from.
https://www.ip2location.com
MIT License
61 stars 30 forks source link

new fields in 8.4.0 "address_type" "category" - any example available? #49

Closed pbiering closed 3 years ago

pbiering commented 3 years ago

Can one provide a valid output example, current sample database 25 only contains "DEMO":

$ ./ip2location -d IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY.SAMPLE.BIN -p 1.2.3.4 
"ip","country_code","country_name","region_name","city_name","isp","latitude","longitude","domain","zip_code","time_zone","net_speed","idd_code","area_code","weather_station_code","weather_station_name","mcc","mnc","mobile_brand","elevation","usage_type","address_type","category"
"1.2.3.4","US","United States of America","DEMO","DEMO","DEMO","0.000000","0.000000","DEMO","DEMO","DEMO","DEMO","DEMO","DEMO","DEMO","DEMO","DEMO","DEMO","DEMO","0.000000","DEMO","DEMO","DEMO"

$ ./ip2location -d IPV6-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY.SAMPLE.BIN -p 1.2.3.4 -b
BIN version 2021-5-26

also from code it is not visible what values will be exposed here by database for particular IP addresses.

pbiering commented 3 years ago

Hmm, using now the IPv4 database, because IPv6 sample database is not containing much information about IPv4:

$ ./ip2location -d IP-COUNTRY-REGION-CITY-LATITUDE-LONGITUDE-ZIPCODE-TIMEZONE-ISP-DOMAIN-NETSPEED-AREACODE-WEATHER-MOBILE-ELEVATION-USAGETYPE-ADDRESSTYPE-CATEGORY-SAMPLE.BIN -p 1.2.3.4 
"ip","country_code","country_name","region_name","city_name","isp","latitude","longitude","domain","zip_code","time_zone","net_speed","idd_code","area_code","weather_station_code","weather_station_name","mcc","mnc","mobile_brand","elevation","usage_type","address_type","category"
"1.2.3.4","AU","Australia","Queensland","Brisbane","APNIC Pty Ltd","-27.467939","153.028091","apnic.net","4000","+10:00","T1","61","07","ASXX0016","Brisbane","-","-","-","10.000000","DCH","U","IAB19-18"

But what means for "1.2.3.4"

Related result of "10.0.0.1"

ip2location commented 3 years ago

I apologize for the confusion. README has been updated with the description for the newly introduced "address type" and "category".

pbiering commented 3 years ago

Thank you for the update, do you plan to release 8.4.1 next including all the updates after 8.4.0 including fix for https://github.com/chrislim2888/IP2Location-C-Library/issues/44 ?