View Single Post
Old 07-18-2007, 09:21 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,446
sde is on a distinguished road
wow, talk about digging up a 4 year old post!

anyhow, your example is wrong. your "if" statement would pass regardless of where the location of the partial IP is. strstr just returns the string up until the position of the match.

example: 1.2.3.58, 1.2.74.171

both of those IPs would be denied access. you need to use regular expressions to indicate that '58' is the beginning of what you are trying to match.
__________________
Mike
sde is offline   Reply With Quote