Detecting if an IP address is in a certain range in PHP

cropped-view-of-african-american-businessman-using-laptop-and-smartphone-in-car-with-cyber-security

Here is another trick that can make your job easier!   If you ever need to detect whether an IP address (let’s say 192.168.0.2) is inside a certain IP range/subnet (let’s say 192.168.0.0/24), you can use the following function in PHP : /** * Check IPv4 address is within a range * * @param string […]