isIPInRange

Determines whether the given IP address is in a specific range

isIPInRange(ips, ip) → returns boolean

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Argument Reference

ips any
Required

comma-delimited list or array as ip range, either a specific ip address, a from to range or with * wildcard

ip string
Required

ip to test

Examples
Sample code invoking the isIPInRange function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub