Comparing values question.
| From: | Tom Ray [Lists] | Date: | Sat, 24 May 2003 21:15:06 +0000 |
| Subject: | Comparing values question. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148879@lists.php.net to get a copy of this message | ||
I've written a guestbook script and I have IP banning in it. Basically it checks a flat file with a list of IP address in it and if they match the users IP they are denied the ability to post. That works all fine and dandy. But here's my question.
How do I get it to compare against a block of IPs? So if I was to add 1.1.1.* to the list to block everyone from that IP Block, how do I compare the 1.1.1.* to like 1.1.1.20 and still have it block? I looked over things at PHP.net and I'm guessing I'm just looking over something simple. Anyone have any thoughts or suggestions?
TIA