Experienced friends may know that when using libraries like QQIP, the IP addresses we find are all a string of numbers. Let’s tell you how to convert the IP address into numbers.
The code is as follows
代码如下 |
复制代码 |
echo ip2long("192.168.1.189")." ";
echo (192*255*255*255+168*255*255+1*256+189)." ";
?>
|
|
Copy code
|
|
echo ip2long("192.168.1.189")."
";
echo (192*255*255*255+168*255*255+1*256+189)."
";
?>
-1062731331 3194548645
http://www.bkjia.com/PHPjc/631622.htmlwww.bkjia.comtrue
http: //www.bkjia.com/PHPjc/631622.htmlExperienced friends may know that when using a library like QQIP, the IP address we find is a string of numbers. , below we will tell you how to implement the method of converting IP address into numbers. The code is like...