PHP code example of xiaoqingping / ip-region

1. Go to this page and download the library: Download xiaoqingping/ip-region 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/ */

    

xiaoqingping / ip-region example snippets



Lemon\IpRegion;
$ipRegion = new IpRegion;
var_dump($ipRegion->btreeSearch('127.0.0.1'));


Lemon\IpRegion;

var_dump(IpRegion::search('127.0.0.1'));
var_dump(IpRegion::search('127.0.0.1', 'memory'));