iluvperl has asked for the wisdom of the Perl Monks concerning the following question:
I thought I could do this by s/// the final octet of the IP and then check to see if it exists already, but that logic fails, of course, because it'd fail even if the same IP appeared twice.
I guess I'll need to store the entire IP address and see if an IP with a different last octet is seen. This must be really easy but the logic is just playing with my head.
I think I will be using MYSQL to store all the information (ips, timestamps, etc).
What I really want to do is check to see if the user's IP was seen already using a bot (meaning the same IP range but different numbers at the end) and then block them if two or more users on the same IP range were seen in the past 1 minute.
Any helpful pointers on what data to store to compare with and everything would be great. If this would be easier to do using DB_File, I think I'd rather use that instead.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: blocking last ip octet
by Anonymous Monk on Feb 22, 2006 at 23:31 UTC | |
|
Re: blocking last ip octet
by leighsharpe (Monk) on Feb 23, 2006 at 03:34 UTC | |
|
Re: blocking last ip octet
by leocharre (Priest) on Feb 22, 2006 at 20:59 UTC |