I'm trying to get the latest GeoIP package to work with my local wampserver. I have all of the files - autoload, databases, etc. - setup, at least as far as I know. The code I am using is:
require_once 'GeoIP2/autoload.php'; use GeoIp2/Database/Reader; $reader = new Reader('GeoIP2/GeoLite2-City.mmdb'); $record = $reader->city('22.214.171.124'); print($record->country->isoCode . " "); // 'US'
The above outputs
city('126.96.36.199'); print($record->country->isoCode . " "); // 'US'
I'm using php 5.6. There aren't any errors or warnings displayed anywhere that I can find. Does anyone know what I am missing or how to troubleshoot this?