setRanges() public method
Set the IPv4 or IPv6 ranges that are allowed or forbidden.
The following preparation tasks are performed:
- Recursively substitutes aliases (described in $networks) with their values.
- Removes duplicates
public void setRanges ( $ranges ) | ||
---|---|---|
$ranges | array |
The IPv4 or IPv6 ranges that are allowed or forbidden. When the array is empty, or the option not set, all IP addresses are allowed. Otherwise, the rules are checked sequentially until the first match is found. An IP address is forbidden, when it has not matched any of the rules. Example: [ 'ranges' => [ '192.168.10.128' '!192.168.10.0/24', 'any' // allows any other IP addresses ] ] In this example, access is allowed for all the IPv4 and IPv6 addresses excluding the |
Please login to continue.