Easy way to stop spam

  • Thread starter Thread starter sm1
  • Start date Start date
S

sm1

Hi all,

Quite an innovative and easy way to stop spam I have seen today on forms on a site.

Underneath the form, put a tick box and tell the person to tick the box before sending - stops many spambots :)

Cheers
 
True - but you could say that about every method. Worth a try though for now ;)
 
Upvote 0
A good method is to use a hidden field and then when it is filled it the form doesn't send, only bots can see it because its in the code and the normal user wont fill it in.
 
  • Like
Reactions: sm1
Upvote 0
Have you thought about using CAPTCHA instead?

I use it on my websites, but I personally hate the whole thing, especially the use of CAPTCHA on UKreg's login page. It takes me around 3 or 4 goes to login because the image is so hard to read, even for humans!
 
Upvote 0
Have you thought about using CAPTCHA instead?

I use it on my websites, but I personally hate the whole thing, especially the use of CAPTCHA on UKreg's login page. It takes me around 3 or 4 goes to login because the image is so hard to read, even for humans!

Yeah I try to avoid it, hence why I use the invisible field or a random maths question.

Here is the invisible field one, or inverse CAPTCHA
 
  • Like
Reactions: sm1
Upvote 0
If you have an invisible field don't you run the risk of Google thinking that it's hidden text, and banning you? (Link)
Which would certainly reduce spam....
 
  • Like
Reactions: sm1
Upvote 0
If you have an invisible field don't you run the risk of Google thinking that it's hidden text, and banning you? (Link)
Which would certainly reduce spam....

There's absolutely no reason why the google bot should be scanning a form, right?
 
  • Like
Reactions: sm1
Upvote 0
If you have an invisible field don't you run the risk of Google thinking that it's hidden text, and banning you? (Link)
Which would certainly reduce spam....

Yeah I know, but this is just a field with a smidgen of text no links or keywords. I am yet to test and I wouldn't risk it on my clients site due to the reason above but it is defiantly worth a try.

There's absolutely no reason why the google bot should be scanning a form, right?

Google scan everything!
 
  • Like
Reactions: sm1
Upvote 0
Google scan everything!

You've heard of robots.txt, right?

Especially given google's innovative idea of crapping on your site:
Specifically, when we encounter a <FORM> element on a high-quality site, we might choose to do a small number of queries using the form. For text boxes, our computers automatically choose words from the site that has the form; for select menus, check boxes, and radio buttons on the form, we choose from among the values of the HTML. Having chosen the values for each input, we generate and then try to crawl URLs that correspond to a possible query a user may have made. If we ascertain that the web page resulting from our query is valid, interesting, and includes content not in our index, we may include it in our index much as we would include any other web page.
 
  • Like
Reactions: sm1
Upvote 0
I usually just do this with a question as part of the form - rather than the simple checkbox, which is easy for a spammer to script into the attack.

Something like "What colour is an orange?" , and the form input validates to all lower-case, so you check that the value is "orange" then process the form.

The hidden input form method is dead easy, in the form you have
Code:
   <input style='visibility: none;' name='anti_spam' value='' type='text'/>
and then in your form processing you just do (in PHP)

Code:
 if ($_REQUEST["anti_spam"]=="") {
  [continue processing]
}

That'll do it.
 
  • Like
Reactions: sm1
Upvote 0
Cheers all - just to say I am not actually after a method - just letting you know! ;)
 
Upvote 0
Google do not punish all hidden text AFAIK - afterall a lot of websites use it to hide spoliers for film plots etc.

I personally dislike the CAPTCHA approach - my wife who has dyslexia finds them impossible to use and many of them look very unprofessional. A hidden field like the one mentioned here would be ideal, but probably unlikely to last too long before it is cracked.
 
  • Like
Reactions: sm1
Upvote 0
Yeah, I'm not a great fan of the hidden form field one myself - but another commenter was asking how to do it, so I put it in...

For myself, I tend to use the 'What colour is an orange' type question/answer method, and the sites I use it on haven't been spammed in up to five years of operation now. I also did a database version where you'd got any number of questions (and could change/edit them easily) so that it pulled the question at random.

At that point, a hidden field in the form contained the question id, so that when the form was processed, it could check for the answer of question [x], make sure it was correct, and then process the rest of the form.

All the questions were similar formats - what colour is black? which is larger, an elephant or a mouse? what weighs more, a feather or a jumbo jet? what is 2+2? - and if necessary contained alternative answers (the 2+2 one in particular needs a check for 'four' as well as '4' ) - and so far hasn't been spammed at all, despite being on a site getting thousands of hits a day.

So that tends to be what I use. It's certainly far more user-friendly than a Captcha - and more accessible too. :)
 
  • Like
Reactions: sm1
Upvote 0
I have yet to use the above hidden field method, I too normally go with simple questions, normal a random maths question and I am yet to be spammed.
 
  • Like
Reactions: sm1
Upvote 0
I use Spam arrest their site is spamarrest.com for a small fee they can stop all spam its wonderfull and we no longer have the trouble of sifting though emails everyday to see whats real and whats not. You get a 30 day free trial so its worth looking at.
 
  • Like
Reactions: sm1
Upvote 0

Latest Articles