Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop bots and spams from submitting comments?

Currently

  1. I am using captcha image
  2. I created text field and hide it using javascript. i want its value to be empty on server side, because bots are supposed to fill all the fields on the form. if value isn't empty it it does not process comment.
  3. I also use timestamps to check how long it took while submitting the comment. I supposed if the comment was submitted within 15 seconds, it comes from bot so i also stop processing the comment.

But still I couldn't control bots to submit my comments form. Please help what should I do now?

like image 209
Ejaz Karim Avatar asked Oct 31 '12 13:10

Ejaz Karim


People also ask

How do you stop bots from spamming discord?

The User Settings is located near the lower right of your Discord screen denoted by the gear icon. Go to the “Who Can Add You As A Friend” section and turn off everything if you want complete privacy over your profile. This should stop random profiles and spam bots from messaging you and adding you as a friend.

How do I stop bot comments?

Incorporating some bot prevention like Google's CAPTCHA or reCAPTCHA to prevent fake users from mass commenting. Require that commenters create accounts using verified emails or phone numbers. Allow verified users to flag spam but take caution in how users may misuse this feature. Turn off commenting completely.


2 Answers

Add a hidden field with a misleading id / name

<input type="hidden" id="Username" name="Username" value=""/>

If a bot comes along and fills out your form, they are likely to fill in the hidden field, which users should not be able to, so just disallow the submission if the hidden field has data.

like image 166
Lyuben Todorov Avatar answered Oct 17 '22 06:10

Lyuben Todorov


Why not implement Akismet and let them handle it for you? They have a well documented API, and thousands of people rely on it for spam prevention on Wordpress blogs. I haven't seen a spam comment in probably 3 years now using Akismet on my wife's blog.

like image 1
BLSully Avatar answered Oct 17 '22 07:10

BLSully