Okay, I got it to work. But with a .dat database. First, downloaded geoip.inc & GeoIPv6.dat file from here: https://github.com/vichan-devel/vichan/blob/master/inc/lib/geoip/geoip.inc https://github.com/vichan-devel/vichan/blob/master/inc/lib/geoip/GeoIPv6.dat Then, I wrote this code to show country names: https://pastebin.com/L4pH2w4Z