- класс
NetAddress
(php\net\NetAddress
) - пакет
std
- исходники
php/net/NetAddress.php
Описание
Class NetAddress
NetAddress ::
getAllByName()
NetAddress ::
getByAddress()
NetAddress ::
getLoopbackAddress()
- Returns the loopback address.NetAddress ::
getLocalHost()
- Returns the address of the local host. This is achieved by retrieving
->
__construct()
- Determines the IP address of a host, given the host's name.->
hostName()
- Gets the host name for this IP address.->
hostAddress()
- Returns the IP address string in textual presentation.->
address()
- Returns the raw IP address of this NetAddress->
canonicalHostName()
- Gets the fully qualified domain name for this IP address.->
__toString()
->
isReachable()
- Test whether that address is reachable. Best effort is made by the->
isSiteLocalAddress()
->
isMulticastAddress()
->
isAnyLocalAddress()
->
isLoopbackAddress()
->
isLinkLocalAddress()
->
isMCGlobal()
->
isMCNodeLocal()
->
isMCLinkLocal()
->
isMCSiteLocal()
->
isMCOrgLocal()
NetAddress::getAllByName(string $host): NetAddress[]
NetAddress::getByAddress(int[] $address): NetAddress
NetAddress::getLoopbackAddress(): NetAddress
Returns the loopback address.
The NetAddress returned will represent the IPv4 loopback address, 127.0.0.1, or the IPv6 loopback address, ::1. The IPv4 loopback address returned is only one of many in the form 127...*
NetAddress::getLocalHost(): NetAddress
Returns the address of the local host. This is achieved by retrieving the name of the host from the system, then resolving that name into an NetAddress.
__construct(string $host): void
Determines the IP address of a host, given the host's name.
hostName(): string
Gets the host name for this IP address.
hostAddress(): string
Returns the IP address string in textual presentation.
address(): int[]
Returns the raw IP address of this NetAddress object. The result is in network byte order: the highest order byte of the address is in address()[0].
canonicalHostName(): string
Gets the fully qualified domain name for this IP address. Best effort method, meaning we may not be able to return the FQDN depending on the underlying system configuration.
__toString(): string
isReachable(int $timeout): bool
Test whether that address is reachable. Best effort is made by the implementation to try to reach the host, but firewalls and server configuration may block requests resulting in a unreachable status while some specific ports may be accessible. A typical implementation will use ICMP ECHO REQUESTs if the privilege can be obtained, otherwise it will try to establish a TCP connection on port 7 (Echo) of the destination host.
isSiteLocalAddress(): bool
isMulticastAddress(): bool
isAnyLocalAddress(): bool
isLoopbackAddress(): bool
isLinkLocalAddress(): bool
isMCGlobal(): bool
isMCNodeLocal(): bool
isMCLinkLocal(): bool
isMCSiteLocal(): bool
isMCOrgLocal(): bool