Ȯuo uo qo Xpo ro szo ( to `po zo @Rs z|xo  to  po ro no ! to I Tyo 8~lo zo xho @Rs qo ) ]yo ppo ro tzo    xo ppo zo @Rs ko @xo po ro @tzo  ( to po zo @Rs no to zo ro tzo  ( to po zo @Rs ko  to o ro Wo  (Ito (zo  zo @Rs ?no Ito xpo ro o  ( @Jto 8zo 0zo @Rs no  Kto !bo ro tzo ( to Hzo @zo po @Rs %o to ro to `>˪U0=˪UP_˪Uro zn (ro ro zn (ro XOs 9˪Uro zn (ro ro zn (ro IQo  vQo @˪U˪U &˪Uro zn (ro  o co to <̪UKto ʪUʪUʪUxto  no xo o to 9o  to  U@%po po Pzo no to &po xwo to ੱo to 0qo po Xzo no (,to `2qo  no to ܬo  xqo po `zo no 7; po @zqo po to o  to 5qo po hzo no DHto `7qo @po to @o  HD`so ho pzo po no R}!po +hso o to @o   :qo . Check that PHP was not compiled with option "disable-ipv6".'); } // Check to see if we were given a IP4 $requestIp or $ip by mistake if (!filter_var($requestIp, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { return self::$checkedIps[$cacheKey] = false; } if (str_contains($ip, '/')) { [$address, $netmask] = explode('/', $ip, 2); if (!filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { return self::$checkedIps[$cacheKey] = false; } if ('0' === $netmask) { return (bool) unpack('n*', @inet_pton($address)); } if ($netmask < 1 || $netmask > 128) { return self::$checkedIps[$cacheKey] = false; } } else { if (!filter_var($ip, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { return self::$checkedIps[$cacheKey] = false; } $address = $ip; $netmask = 128; } $bytesAddr = unpack('n*', @inet_pton($address)); $bytesTest = unpack('n*', @inet_pton($requestIp)); if (!$bytesAddr || !$bytesTest) { return self::$checkedIps[$cacheKey] = false; } for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) { $left = $netmask - 16 * ($i - 1); $left = ($left <= 16) ? $left : 16; $mask = ~(0xFFFF >> $left) & 0xFFFF; if (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) { return self::$checkedIps[$cacheKey] = false; } } return self::$checkedIps[$cacheKey] = true; } /** * Anonymizes an IP/IPv6. * * Removes the last byte for v4 and the last 8 bytes for v6 IPs */ public static function anonymize(string $ip): string { $wrappedIPv6 = false; if ('[' === substr($ip, 0, 1) && ']' === substr($ip, -1, 1)) { $wrappedIPv6 = true; $ip = substr($ip, 1, -1); } $packedAddress = inet_pton($ip); if (4 === \strlen($packedAddress)) { $mask = '255.255.255.0'; } elseif ($ip === inet_ntop($packedAddress & inet_pton('::ffff:ffff:ffff'))) { $mask = '::ffff:ffff:ff00'; } elseif ($ip === inet_ntop($packedAddress & inet_pton('::ffff:ffff'))) { $mask = '::ffff:ff00'; } else { $mask = 'ffff:ffff:ffff:ffff:0000:0000:0000:0000'; } $ip = inet_ntop($packedAddress & inet_pton($mask)); if ($wrappedIPv6) { $ip = '['.$ip.']'; } return $ip; } } An Error Occurred: Internal Server Error

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.