PHP Class SimplePie_Net_IPv6, ojs

Author: Alexander Merz ([email protected])
Author: elfrink at introweb dot nl
Author: Geoffrey Sneddon ([email protected])
Afficher le fichier Open project: pkp/ojs Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

SplitV64() public méthode

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)
Résultat array [0] contains the IPv6 part, [1] the IPv4 part (hex format)

Uncompress() public méthode

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)
Résultat string the uncompressed IPv6-address (hex format)

checkIPv6() public méthode

Checks if the given IP is IPv6-compatible
public checkIPv6 ( string $ip ) : boolean
$ip string a valid IPv6-address
Résultat boolean true if $ip is an IPv6 address

removeNetmaskSpec() public méthode

Removes a possible existing netmask specification of an IP address.
Since: 1.1.0
public removeNetmaskSpec ( string $ip ) : string
$ip string the (compressed) IP as Hex representation
Résultat string the IP the without netmask