slim 2 GeoIP2 maxmind
<p>I am working on a API Slim 2 project and I'd like to integrate MaxMind's GeoIP2. I have used composer to install dependencies however it seems I cannot run a GeoIP country lookup for the existing IP entries from the mysql database. If I run script separately ( no Slim 2 ) everything works as expected.</p>

<p>Essentially the API returns json output: IPv4/IPv6 and type of address (ipv4 or ipv6 ). Ideally I want to add GeoIP location information. The output format currently:</p>

<pre><code>    {
        "sourceip": "104.16.58.21",
        "type": "ipv4"
    },
    {
        "sourceip": "159.0.13.131",
        "type": "ipv4"
    }
</code></pre>

<p>Code samples: <a href="http://pastebin.com/heMyyKdw" rel="nofollow">http://pastebin.com/heMyyKdw</a></p>

<p>Has anyone integrated SLIM 2 with Maxmind GeoIP2? </p>