PHP code example of zhuzhichao / ip-location-zh

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

    

zhuzhichao / ip-location-zh example snippets



use Zhuzhichao\IpLocationZh\Ip;


var_dump(Ip::find('171.12.10.156'));

// Laravel 5.5 不需要添加
'aliases' => [
    'Ip'  => 'Zhuzhichao\IpLocationZh\Ip',

],