What is the database for GeoIP.h

428 views Asked by At

In one open source project, I saw that they were including GeoIP.h header file and calling their functions to know the country code of an IP. I wonder where is the database used by GeoIP.h

I went through the source code of GeoIP.h at http://www9.biostr.washington.edu/webalizer/src/stonesteps.ca/webalizer_src_3_4_4_1/GeoIP.h

It uses a variable FILE *GeoIPDatabase; Please suggest. I need the whole database.

===EDIT===

The source code I am visiting is this. It doesn't mention any database to be used! https://github.com/lampeh/libvmod-geoip/blob/master/src/vmod_geoip.c.

2

There are 2 answers

3
Claudi On

Are you looking for this? (see downloads section) http://dev.maxmind.com/geoip/legacy/geolite/

You can download either CSV or binary data files.

1
AudioBubble On

It's available for download on the Maxmind web site. A basic free version is available at:

http://dev.maxmind.com/geoip/legacy/geolite/

More detailed databases are also available for purchase.