PHP code example of zhengbingdong / ip-addrs
1. Go to this page and download the library: Download zhengbingdong/ip-addrs 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/ */
zhengbingdong / ip-addrs example snippets
use Zhengbingdong\IpAddr\IpAddrClient;
/**
* IP解析工具类
* Class DateTools
*/
class Client{
/**
* [get 解析IP]
* @since 2025-10-23
* @author Dai哥
* @param [type] $ip [IP地址]
* @return [type] [description]
*/
public function index()
{
$ip = '127.0.0.1';
$info = IpAddrClient:get($ip);
}
}