gethostbyaddrgethostbyaddr address , [ addrtype ]
Retrieves the hostname (and alternate addresses) of
a packed binary network
address
. (
addrtype
indicates the
type of address given. Since where($name, $aliases, $addrtype, $length, @addrs)
@addrs
is a list of packed binary addresses. In the Internet domain, each address is
four bytes long and can be unpacked by saying something like:
In scalar context,($a, $b, $c, $d) = unpack('C4', $addrs[0]);
gethostbyaddr
returns only the
hostname.
|
|