-
-
Save Onepamopa/3581bb61b939f9da285bb7ae7ae57dfa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'geoip2.phar'; | |
use GeoIp2\Database\Reader; | |
$reader = new Reader('GeoLite2-Country.mmdb'); | |
$record = $reader->country($_SERVER['REMOTE_ADDR']); | |
echo $record; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment