without coding the sql this is a thought process only
create a table in the database temp_bans.
with colums for username logintimestamp failurecount banned
on login {
if temp_bans.username AND banned AND timestamp+20minutes > timenow die( you are banned until ($timestamp+20minutes))
if login fail {
if not temp_bans.username { create temp_bans.username }
update temp_bans.username increment falurecount timestamp
if failurecount=5 {update temp_bans.username (banned=yes failurecount=0)}
}
if login succeeds {delete temp_bans.username}
}
with a little thought this is only a single sql query, not up to thought at the moment
Last edited by almostbob; Feb 13th, 2009 at 2:03 pm.
Reputation Points: 562
Solved Threads: 368
Posting Maven
Offline 2,970 posts
since Jan 2009