Forum Moderators: coopster
I could do some data checking before it goes into the table but I am having trouble coming up with a pattern to parse the data against with. Because there are so many different words they could use. Instead of advertising their porn shops, some people could advertise something else. I was wondering how people here go about solving this problem. I would appreciate all your inputs.
Also include a hidden field with a random number and on receiving the form submit data check the random number to see if the data comes from the form.
I didn't expect that people would abuse the form like they have. And I never thought of validating the form inputs because it's just too broad.
And I never thought of validating the form inputs because it's just too broad.
Well, you should ALL the time validate the input and make a moderating-like system.
VALIDATE
I am sure you have a bunch of functions like this one.
// ALLOW A-Z, a-z, 0-9, space and _
// ********************************
function check_field2($var){if(!preg_match("/[^A-Za-z0-9_ ]/",$var)) {return TRUE;} else {return FALSE;}} If yes, always validate the input before entering the data (this will remove all the junk posts which use fun symbol)
MODERATE
Add a field 'auth' in your database.
NULL - rejected
0 - awaiting authorisation
1 - authorised.
Receive an email when a comment has been sent with a direct link to your administrative pages where post awaiting authorisation are listed. Fast and efficient.
Make few buttons/boxes (Reject and BAN, Reject, Authorised).
Also, do not forget to make you "ban" database where banned IP can be stored (you should catch the IP in a hidden field).
If you are using form method="GET" they are able to enter form data without loading the form by just accessing the right url. In that case use method="POST"
That's not true. Any form can be reproduced. If the browser can submit it, what stops another program to do the same?
It's no more than 10 lines of Perl code to submit the POST form.
To stop this you have several options:
Remember, spammers are not specifically after your site. They are after 1000s of websites and submit the spam automatically with specially designed programs and scripts. If you make it hard for them, it's not going to be worth the effort, and they just won't bother.
I don't know how you would add that to the value. might have to use client side scripting for it unless you could do it with plain html.
this might help prevent posts coming in from other places then the form.
I don't know of any bots that parse javascript well enough to solve something like that. So yes I suppose that would work if you used javascript.
include a hidden field with a random number and on receiving the form submit data check the random number to see if the data comes from the form
Personally I like this one the best for stopping bots. A variation of this would be to save the random number in a cookie or session. I don't think most bots are smart enough to use cookies, especially if you set the cookie using some javascript.