IpUtils::checkIp4()

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

Compares two IPv4 addresses.

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

Parameters

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

Return Value

bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet
doc_Symfony
2016-10-28 06:21:47
Comments
Leave a Comment

Please login to continue.