2,8 → 2,8 |
|
/* |
* IPv4 functions for PHP |
* Copyright 2012-2021 Daniel Marschall, ViaThinkSoft |
* Version 2021-05-21 |
* Copyright 2012-2022 Daniel Marschall, ViaThinkSoft |
* Version 2022-09-18 |
* |
* Licensed under the Apache License, Version 2.0 (the "License"); |
* you may not use this file except in compliance with the License. |
402,7 → 402,7 |
} else { |
$rng = explode('-', $line); |
$rng[0] = trim($rng[0]); |
$rng[1] = trim($rng[1]); |
if (isset($rng[1])) $rng[1] = trim($rng[1]); |
$rng[0] = ipv4_normalize($rng[0]); |
if (!isset($rng[1])) $rng[1] = $rng[0]; |
$rng[1] = ipv4_normalize($rng[1]); |
565,10 → 565,7 |
if (strlen($bin) != 128) { |
return false; |
} |
$pad = 128 - strlen($bin); |
for ($i = 1; $i <= $pad; $i++) { |
$bin = '0'.$bin; |
} |
//$bin = str_pad($bin, 128, '0', STR_PAD_LEFT); |
$bits = 0; |
$ipv6 = ''; # added by vts to avoid warning |
while ($bits <= 7) { |