The whitelist of permitted client IP addresses should accept the use of CIDR notation to specify multiple IP addresses.

This would simplify the process of supporting many servers in controlled address space (whitelist your entire allocation), development/testing in virtualised environments (whitelist 192.168.56.0/24), etc.

Using ip2long and bitwise operators it's pretty straightforward to handle this case as well. The function here seems to work with normal IP4v addresses as currently used and IPv4 CIDR notation blocks.