PHP code example of iplocation / local

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

    

iplocation / local example snippets



use IpLocation\local\Ip;


var_dump(Ip::find('171.12.10.156'));//输出数组

var_dump(Ip::location('171.12.10.156')); //直接输出地址

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

],