Maybe someone will be intersted: just for lulz built a little C geolocation app to use with execute() (since the way with Perl was not fast enough)
its an implentation of https://github.com/maxmind/geoip-api-c (had to do make some changes to compile it on linux)
Just put the GeoLityCity.dat http://dev.maxmind.com/geoip/legacy/geolite/ where the app is and use it something like like:
PHP Code:
result = execute("cd /home/voron/GeoIP && ./geoiplookup -f GeoLiteCity.dat -l " + self GetIP());
The returned result (ip 8.8.8.8):
You can split it using strtok or edit the source for your printing pleasure, well, you know the drill.
App:
geoiplookup.zip
Source:
geoiplookup_source.zip