Jork449 Jork449 - 1 month ago 16
C++ Question

GeoIP for C++ is there a lib for this?

I have looked and looked and I can't seen to find a C++ version of GeoIP. I know there is a version of it in C, but I can't seem to get it working with Micosoft Visual Studio 2012 C++

I have tried:



So,


  1. Does a GeoIPC++ version exist?

  2. Is there another lib that does IP to country like GeoIP in C++?

  3. Is there a tutorial on how to get GeoIP working with C++?



Sorry for all the questions but i have looked and looked and I can't seem to find a solution.

Answer

GeoIP is an online database which is updating its data everyday (or monthly!).

Also, You can have a big offline database to map IP-to-Location beside your application (and you need keep it up to date periodically).

GeoIP is not bound to a specific programming language, you can connect to this database using a web-service mechanism. Simply connect to the online service by a TCP/HTTP request and retrieve data.

The HTTP API requires you to pass a set of parameters as an HTTP GET or POST. Results are returned in a simple text format documented below.

We offer several different services, each providing a different amount of information about the IP address.