IPUtils
class IPUtils (View source)
Http utility functions.
Methods
public 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.
Details
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.
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.
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.