inet_pton
Convert human-readable IP addresses to their compressed in_addr representation
inet_pton()
function converts a readable IP address into a packaged 32-bit IPv4 or 128-bit IPv6 format.
Convert readable IP addresses to packaged format:
<?php $addr = inet_pton ( "127.0.1.1" ) ; echo $addr ; ?>
parameter | describe |
---|---|
address | Required. Specifies a readable IP address. |