Unix and Linux Discussions Tagged with ip address |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
4,914 |
Cybersecurity |
|
|
|
6 |
7,313 |
Shell Programming and Scripting |
|
|
|
7 |
7,804 |
Cybersecurity |
|
|
|
2 |
2,223 |
UNIX for Beginners Questions & Answers |
|
|
|
16 |
5,477 |
What is on Your Mind? |
|
|
|
5 |
6,971 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
2,824 |
Shell Programming and Scripting |
|
|
|
4 |
4,227 |
Shell Programming and Scripting |
|
|
|
2 |
1,674 |
IP Networking |
|
|
|
10 |
7,342 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
10,736 |
IP Networking |
|
|
|
0 |
2,818 |
UNIX for Advanced & Expert Users |
|
|
|
29 |
21,019 |
Solaris |
|
|
|
2 |
3,616 |
Shell Programming and Scripting |
|
|
|
6 |
24,905 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
15,416 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
7,210 |
Solaris |
|
|
|
1 |
10,714 |
Shell Programming and Scripting |
|
|
|
0 |
4,388 |
UNIX and Linux Applications |
|
|
|
3 |
9,943 |
Shell Programming and Scripting |
|
|
|
2 |
4,615 |
Linux |
|
|
|
4 |
3,395 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
9,657 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
6,053 |
Linux |
|
|
|
3 |
21,723 |
IP Networking |
|
|
|
6 |
50,574 |
Solaris |
|
|
|
2 |
4,225 |
UNIX for Dummies Questions & Answers |
|
|
|
7 |
21,837 |
OS X (Apple) |
|
|
|
5 |
5,466 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
10,567 |
AIX |
|
|
|
9 |
19,997 |
UNIX for Dummies Questions & Answers |
|
|
|
15 |
40,648 |
IP Networking |
|
|
|
2 |
2,316 |
Shell Programming and Scripting |
|
|
|
4 |
11,489 |
UNIX and Linux Applications |
|
|
|
2 |
14,067 |
Shell Programming and Scripting |
|
|
|
3 |
3,855 |
Shell Programming and Scripting |
|
|
|
7 |
9,946 |
Solaris |
|
|
|
9 |
6,767 |
Solaris |
|
|
|
3 |
5,854 |
Shell Programming and Scripting |
|
|
|
2 |
6,350 |
IP Networking |
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)