PHP code example of iszmxw / ip-address

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

    

iszmxw / ip-address example snippets




zmxw\IpAddress\Address;
$ip = Address::ip();
$address = Address::address($ip);
print_r($ip); // 打印ip
print_r($address); //打印详细信息