IpAllowDeny
class IpAllowDeny (View source)
PhpMyAdmin\IpAllowDeny class
Methods
No description
Matches for IPv4 or IPv6 addresses
Based on IP Pattern Matcher Originally by J.Adams jna@retina.net Found on https://www.php.net/manual/en/function.ip2long.php Modified for phpMyAdmin
IPv6 matcher CIDR section taken from https://stackoverflow.com/a/10086404 Modified for phpMyAdmin
Runs through IP Allow rules the use of it below for more information
Runs through IP Deny rules the use of it below for more information
Details
__construct()
No description
bool
ipMaskTest(string $testRange, string $ipToTest)
Matches for IPv4 or IPv6 addresses
bool
ipv4MaskTest(string $testRange, string $ipToTest)
Based on IP Pattern Matcher Originally by J.Adams jna@retina.net Found on https://www.php.net/manual/en/function.ip2long.php Modified for phpMyAdmin
Matches: xxx.xxx.xxx.xxx (exact) xxx.xxx.xxx.[yyy-zzz] (range) xxx.xxx.xxx.xxx/nn (CIDR)
Does not match: xxx.xxx.xxx.xx[yyy-zzz] (range, partial octets not supported)
bool
ipv6MaskTest(string $testRange, string $ipToTest)
IPv6 matcher CIDR section taken from https://stackoverflow.com/a/10086404 Modified for phpMyAdmin
Matches: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx (exact) xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:[yyyy-zzzz] (range, only at end of IP - no subnets) xxxx:xxxx:xxxx:xxxx/nn (CIDR)
Does not match: xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xx[yyy-zzz] (range, partial octets not supported)
bool
allow()
Runs through IP Allow rules the use of it below for more information
bool
deny()
Runs through IP Deny rules the use of it below for more information