Im adding a comment section to my forums and i want to add a delay, Maybe 30 seconds or so to stop people spamming along with a captcha .
Whats the best way to do this? Only way i can think is using cookies, any other suggestions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When a user post their comment, write the current timestamp in a session and add it additional 30 seconds:
When you want to check if 30 seconds are passed, get the current timestamp and compare them: if the current timestamp is bigger then one in session, then 30 seconds are passed:
For more security, you could insert user’s IP + post timestamp in the database.