IpUtils::checkIp()

static bool checkIp(string $requestIp, string|array $ips)

Checks if an IPv4 or IPv6 address is contained in the list of given IPs or subnets.

Parameters

string $requestIp IP to check
string|array $ips List of IPs or subnets (can be a string if only a single one)

Return Value

bool Whether the IP is valid
doc_Symfony
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.