

#Maxmind geoip2 license key
You can see your license key information on your account License Keys page.įor Free GeoLite2 Databases – The GeoIP Update program will also work without an account to retrieve the GeoLite2 databases. You will need to replace the YOUR_LICENSE_KEY_HERE placeholder with an active license key associated with your MaxMind account. Step 2: Obtain ‘nf’ with your Account Information:įor Paid GeoIP2 and GeoIP Legacy Databases– Get a partially pre-filled configuration file (may require authentication) and save it in your configuration directory (e.g., /usr/local/etc/) as nf. The latest release may be downloaded from GitHub Releases. MaxMind provides the GeoIP Update program, which performs automatic updates for both GeoIP2 and GeoIP Legacy binary databases. If you’re working on any PHP Framework(eg: Yii framework) then refer below code.If you’re not using any PHP framework, then use the below code.Reading data from the database with example: If your page is in sub-folder, then take the below reference require_once( dirname(_FILE_).'/./vendor/autoload.php') Ĥ.The extension has no effect on web-service lookups. To install, please follow the instructions included with that API.
#Maxmind geoip2 install


If you use a version control system, composer.json should be added to it. composer.json and composer.lock as well as the directory vendor in your project directory is automatically generated.Run in your project root: php composer.phar require geoip2/geoip2:~2.0.Installing geoip2 data-reader dependency:.You should now have the file composer.phar in your project directory.
#Maxmind geoip2 download
