GeoLite2++  v0.0.1-2036
C++ API for MaxMind's GeoLite2 Database
GeoLite2++
Author
St├ęphane Charette, steph.nosp@m.anec.nosp@m.haret.nosp@m.te@g.nosp@m.mail..nosp@m.com
See also
Official Documentation
Download GeoLite2++
license.txt
Usage

 


Example C++:

#include <GeoLite2PP.hpp>
// ...
std::string database_filename = "/opt/my_project_files/GeoLite2-City.mmdb";
GeoLite2PP::DB db( database_filename );
std::string json = db.lookup( "65.44.217.6" );
std::cout << json << std::endl;

Example output:

1 { "city" : { "names" : { "en" : "Fresno" } },
2  "continent" : { "code" : "NA", "names" : { "en" : "North America" } },
3  "country" : { "iso_code" : "US", "names" : { "en" : "United States" } },
4  "location" : { "accuracy_radius" : 200,
5  "latitude" : 36.6055,
6  "longitude" : -119.752,
7  "time_zone" : "America/Los_Angeles" },
8  "postal" : { "code" : "93725" },
9  "subdivisions" : [ { "iso_code" : "CA", "names" : { "en" : "California" } } ]
10 }