uncompressIPv6
Quote
uncompressIPv6( string $ip [ , num $count] )
Parameters
ip
The IPv6 address that we would convert.
counter
This parameter shows how many : are in the full length version.
Note: IPv6 address has 7 of them, but the mixed (IPv6 and IPv4) address has only 5.
Return Values
uncompressIPv6() will return the full length version of the given $ip.
Example
Code
<?php
$ipv6 = "ABCD:123:45::9";
$ip = uncompressIPv6($ipv6, 7);
echo $ip;
?>
This example will output the long version of $ipv6.
Output
Quote
ABCD:0123:0045:0000:0000:0000:0000:0009