简体   繁体   中英

Getting the locid from the maxmind geoip binary

Maxmind's geoip csv files contain a locid, which I use as a key for my internal records. It does not appear like the locid is available in the geoip city binary file when accessed through maxmind's php api. Is that information available at all from the binary?

this is the class that is returned from the geoip_record_by_addr() function call:

class geoiprecord
{
  public $country_code;
  public $country_code3;
  public $country_name;
  public $region;
  public $city;
  public $postal_code;
  public $latitude;
  public $longitude;
  public $area_code;
  public $dma_code; # metro and dma code are the same. use metro_code
  public $metro_code;
  public $continent_code;
}

There is no locid in the binary. @oschwald is right.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM