Ever wanted to prevent your message board or guestbook from being flooded by unwanted hackers and lamers?? Check this script out. It allows you to set a time limit between two posts. if a user posts a message, then he cannot post another until 'n' seconds have elapsed. You can configure 'n'.


Const flood=60 'This is the time in seconds uptil which a user has to wait before posting another message

if Request("Submit") = "Submit" then   'This contains the value of ur submit button
    If (session("flood") = "") or (datediff("s",session("flood"),now)>flood) then
        session("flood") = now
    else
         if (Datediff("s",session("flood"),now))< flood then
              response.Redirect("flood.asp")
         end if
    end if

'Action to perform if time limit is satisfied. Given below is an example.
Response.Write("You have not flooded this board. thank you")

end if

 

 
Site best viewed in IE 5.5+ with 800 X 600 resolution
© Drumster, 2003