Qt library for using MaxMind's GeoIP databases. Used in my master thesis: https://github.com/wimleers/master-thesis, which is performed at Hasselt University: http://uhasselt.be/.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Sample
Tests
data
libGeoIP
.gitignore
QGeoIP.cpp
QGeoIP.h
QGeoIP.pri
README
UNLICENSE

README

Description
-----------

This Qt library is in fact a wrapper around MaxMind's GeoIP library. Therefor,
it also uses MaxMind's GeoIP databases.

While this Qt library is released into the public domain (see UNLICENSE), the
same cannot be said of MaxMind's GeoIP library, which is released under the
LGPL license (see libGeoIP/COPYING).
No changes have been made to any of the files in the libGeoIP directory. It is
the latest version they provide: 1.4.7 beta 9. The Makefile has been removed,
in favor of a newly added .pro file.

For an overview of the available methods, see QGeoIP.h.


Usage
-----

1) You can download MaxMind's GeoIP databases here:
• GeoLite City
  - homepage: http://www.maxmind.com/app/geolitecity
  - binary format download:
    http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
• GeoLite ASN
  - homepage: http://www.maxmind.com/app/asnum
  - binary format download:
    http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz

These files are compressed using gzip. First decompress them. Then, ensure
they have the following filenames: "GeoIPCity.dat" and "GeoIPASNum.dat".
Finally, move them to the QGeoIP's "data" directory.


2) Build MaxMind's libGeoIP, by opening libGeoIP/GeoIP.pro, generating a
makefile and running `make`.

3) Now you can build and run both the included sample application and the unit
tests.


Using in your own project
-------------------------
All you have to do to include QGeoIP in your own app (and to automatically
copy the .dat files to your app's builds), is including QGeoIP.pri in your
.pro file:
    include("/path/to/QGeoIP/QGeoIP.pri")

Of course, you still have to build libGeoIP first, by opening
libGeoIP/GeoIP.pro, generating a makefile and running `make`.


Author
------
Wim Leers ~ http://wimleers.com/

Written as part of the master thesis of Wim Leers at Hasselt University

http://wimleers.com/tags/master-thesis
http://uhasselt.be/