ip2long
(PHP4 >= 4.0RC1)
ip2long --- 转换 IP(IPv4)成为适当的位址
语法 :
int ip2long
(string ip_address)说明 :
ip2long( )从它的Internet标准格式(有逗点的字符串),产生IPv4 Internet network位址。
Example :
<?php
$ip = gethostbyname("www.php.net");
$out = "The following URLs are equivalent:<br>\n";
$out .= "http://www.php.net/, http://".$ip."/, and http://".ip2long($ip)."/<br>\n";
echo $out;
?>
参考 : long2ip( )