inet_pton(3) php man page | unix.com

Man Page: inet_pton

Operating Environment: php

Section: 3

INET_PTON(3)								 1							      INET_PTON(3)

inet_pton - Converts a human readable IP address to its packed in_addr representation

SYNOPSIS
string inet_pton (string $address)
DESCRIPTION
This function converts a human readable IPv4 or IPv6 address (if PHP was built with IPv6 support enabled) into an address family appropri- ate 32bit or 128bit binary structure.
PARAMETERS
o $address - A human readable IPv4 or IPv6 address.
RETURN VALUES
Returns the in_addr representation of the given $address, or FALSE if a syntactically invalid $address is given (for example, an IPv4 address without dots or an IPv6 address without colons).
EXAMPLES
Example #1 inet_pton(3) Example <?php $in_addr = inet_pton('127.0.0.1'); $in6_addr = inet_pton('::1'); ?>
CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | This function is now available on Windows plat- | | | forms. | | | | +--------+---------------------------------------------------+
SEE ALSO
ip2long(3), long2ip(3), inet_ntop(3). PHP Documentation Group INET_PTON(3)
Related Man Pages
inet_pton(3) - redhat
inet_pton(3) - debian
inet_pton(3) - centos
inet_pton(3) - minix
inet_pton(3) - x11r4
Similar Topics in the Unix Linux Community
Obtaining IP address
Changing Machine IP address
how to detect ip address based location using PHP
HOW TO DISABLE SIT0 in REDHAT LINUX 5.1
IPMP + IPv6 test address