Please i need your help.
I’m scripting a comment functionality on my website, and i’m trying to reduce spamming to the barest minimum.. My issue/problem is that when users/bots(possibly) submit a comment, i have this code to do a HTTP/1.1 303 redirect to the same page so that when the user attempts to refresh the page the previous comment does not re-submit.
Will this be enough for spam reduction.
Thanks for your time, patience and answers. I most appreciate it.
header("HTTP/1.1 303 See Other");
header("Location: http://127.0.0.1/ main/forum/
I don’t think would help you achive your goal which is
reduce spammingyou can do the followingA. Check if a page as been refresh then redirect and this has been discussed extensively here : see
PHP refresh
B. To prevent proper flooding to need to limit number of request for sec for each IP address See
Prevent PHP script from being flooded
Edit 1
Non OOP version as requested by you :