IpUtils::checkIp6()

static bool checkIp6(string $requestIp, string $ip)

Compares two IPv6 addresses.

In case a subnet is given, it checks if it contains the request IP.

Parameters

string $requestIp IPv6 address to check
string $ip IPv6 address or subnet in CIDR notation

Return Value

bool Whether the IP is valid

Exceptions

RuntimeException When IPV6 support is not enabled

See also

https://github.com/dsp/v6tools
doc_Symfony
2016-10-28 06:21:47
Comments
Leave a Comment

Please login to continue.