时间:2021-07-01 10:21:17 帮助过:39人阅读
= 4){ $long = intval($key[0]) * 16777216 + intval($key[1]) * 65536 + intval($key[2]) * 256 + intval($key[3]); } return $long; } function longtoip($long){ $long = floor($long); $p4 = $long - floor($long / 256) * 256; $long = ($long - $p4) / 256; $p3 = $long - floor($long / 256) * 256; $long = ($long - $p3) / 256; $p2 = $long - floor($long / 256) * 256; $long = ($long - $p2) / 256; $p1 = $long; $ip = $p1.'.'.$p2.'.'.$p3.'.'.$p4; return $ip; } ?>