public function ipArea(){
$arr = [
['223.8.0.0','223.15.255.255'],
['118.72.0.0','118.79.255.255'],
['115.24.0.0','115.27.255.255'],
['123.174.0.0','123.175.255.255'],
['218.26.0.0','218.26.255.255'],
['222.199.0.0','222.199.255.255'],
['202.97.128.0','202.97.191.255'],
['202.99.200.0','202.99.207.255'],
['183.184.0.0','183.191.255.255'],
['218.200.0.0','218.203.255.255'],
['113.24.0.0','113.27.255.255'],
['221.204.0.0','221.205.255.255'],
['59.48.0.0','59.48.255.255'],
['124.163.0.0','124.163.255.255'],
['61.134.192.0','61.134.255.255'],
['103.22.72.0','103.22.75.255'],
['171.120.0.0','171.127.255.255'],
['171.116.0.0','171.119.255.255'],
['1.68.0.0','1.71.255.255'],
['118.80.0.0','118.81.255.255'],
['211.82.0.0','211.82.255.255'],
['59.49.0.0','59.49.127.255'],
['202.99.208.0','202.99.223.255'],
['110.176.0.0','110.183.255.255'],
['124.164.0.0','124.167.255.255'],
['60.220.0.0','60.223.255.255'],
['121.30.0.0','121.30.255.255'],
['219.149.128.0','219.149.191.255'],
['202.99.192.0','202.99.199.255'],
];
return $arr;
}
public function getRandIp(){
$ip_long = ipArea();
$rand_key = mt_rand(0, count($ip_long)-1);
$huoduan_ip= long2ip(mt_rand(ip2long($ip_long[$rand_key][0]), ip2long($ip_long[$rand_key][1])));
return $huoduan_ip;
}
基于ip段生辰随机IP
最新推荐文章于 2024-09-13 09:07:30 发布