PHP Класс SimplePie_Net_IPv6, ojs

Автор: Alexander Merz ([email protected])
Автор: elfrink at introweb dot nl
Автор: Geoffrey Sneddon ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
SplitV64 ( string $ip ) : array Splits an IPv6 address into the IPv6 and a possible IPv4 part
Uncompress ( string $ip ) : string Uncompresses an IPv6 address
checkIPv6 ( string $ip ) : boolean Checks an IPv6 address
removeNetmaskSpec ( string $ip ) : string Removes a possible existing netmask specification of an IP address.

Описание методов

SplitV64() публичный Метод

RFC 2373 allows you to note the last two parts of an IPv6 address as an IPv4 compatible address Example: 0:0:0:0:0:0:13.1.68.3 0:0:0:0:0:FFFF:129.144.52.38
public SplitV64 ( string $ip ) : array
$ip string a valid IPv6-address (hex format)
Результат array [0] contains the IPv6 part, [1] the IPv4 part (hex format)

Uncompress() публичный Метод

RFC 2373 allows you to compress zeros in an address to '::'. This function expects an valid IPv6 address and expands the '::' to the required zeros. Example: FF01::101 -> FF01:0:0:0:0:0:0:101 ::1 -> 0:0:0:0:0:0:0:1
public Uncompress ( string $ip ) : string
$ip string a valid IPv6-address (hex format)
Результат string the uncompressed IPv6-address (hex format)

checkIPv6() публичный Метод

Checks if the given IP is IPv6-compatible
public checkIPv6 ( string $ip ) : boolean
$ip string a valid IPv6-address
Результат boolean true if $ip is an IPv6 address

removeNetmaskSpec() публичный Метод

Removes a possible existing netmask specification of an IP address.
С версии: 1.1.0
public removeNetmaskSpec ( string $ip ) : string
$ip string the (compressed) IP as Hex representation
Результат string the IP the without netmask