Block IP Script?
| From: | Devin Atencio | Date: | Thu, 04 Apr 2002 17:30:30 +0000 |
| Subject: | Block IP Script? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-91556@lists.php.net to get a copy of this message | ||
I was wondering If I made a database to store a list of IP CIDR
in a database to block, how I could take an IP of a customer coming
in and find a quick way if it matches a blocked IP in the database?
For instance, in the database I would store something like this:
208.219.20.0/24
Then if someone came in on 208.219.20.22, it would know that the entire
class C was blocked. Is there an easy way to deal with this type of
thing in PHP/MySQL?