PHP code example of librarymarket / maxmind-db-reader
1. Go to this page and download the library: Download librarymarket/maxmind-db-reader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
librarymarket / maxmind-db-reader example snippets
$reader = new \LibraryMarket\MaxMind\Database\Reader('/path/to/database.mmdb');
// Search for an IP address in human-readable format.
$reader->searchForAddress('127.0.0.1');
$reader->searchForAddress('::1');