You can't make sessions count down. Instead of setting "30sec" in your
session,store "mktime()" for the current time. Next time a user hits
the send button you check the current time with the time you allready
had stored in your session. Note that if a user deletes the browsers
cookie, session get lost so they can pass that check.



On 26 sep, 06:26, rocket <[EMAIL PROTECTED]> wrote:
> hey guys
> i implemented a simple mail system in my site and was wondering what i
> ought to do for flood control. I dont' want people to keep hitting
> refresh after they hit send thus spamming...
>
> I was thinking of doing something like
> $this->Session->write('Timeout', 30);
>
> To simulate a 30 second countdown then just checking this timout
> before another post is allowed... but I dont know how to make sessions
> count down.
>
> any ideas are appriciated!
>
> rocket
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to