메소드 | 설명 | |
---|---|---|
__construct ( string $range ) | Constructor for the class. | |
containsIp ( string $ipAddress ) : boolean | Returns whether or not a given IP address falls within this range. |
메소드 | 설명 | |
---|---|---|
convertToBinaryString ( string $address ) : string | Converts an IPv6 address to a binary string. | |
extractNetworkAndMaskFromRange ( string $range ) | Extracts the mask and binary string substring of the range to compare against incoming IP addresses. | |
hexToBinary ( string $hex ) : string | Converts a hexadecimal character to a 4-digit binary string. |
public __construct ( string $range ) | ||
$range | string | The IPv6 range as a string. Supported range styles: - CIDR notation (2400:cb00::/32) - a specific IP address (::1) |
public containsIp ( string $ipAddress ) : boolean | ||
$ipAddress | string | The given IP address. |
리턴 | boolean | Returns true if the IP address falls within the range and false otherwise. |