i am trying to calculate ipv6 range with the help of gmp library.
eg: start IP: FE80:CD00:0000:0CDE:1257:0000:211E:729B end IP: FE80:CD00:0000:0CDE:1257:0000:210D:729E
i have start and end of ipv6 . i want all ip between start and end of ip6.
i am trying to calculate ipv6 range with the help of gmp library.
eg: start IP: FE80:CD00:0000:0CDE:1257:0000:211E:729B end IP: FE80:CD00:0000:0CDE:1257:0000:210D:729E
i have start and end of ipv6 . i want all ip between start and end of ip6.
I would suggest foregoing GMP in favour of a pre-made library, for example S1lentium/IPTools.
$range = new Range(new IP('FE80:CD00:0000:0CDE:1257:0000:211E:729B'), new IP('FE80:CD00:0000:0CDE:1257:0000:210D:729E'));
foreach($range as $ip) {
echo (string)$ip . '<br>';
}