Web Bot Form Spamming

Tips submitted by ASPMaker users

Web Bot Form Spamming

Postby JAW » Mon Jun 30, 2014 6:59 pm

Hello,
I have come across a unique way to prevent form spamming that seems to work 100% of the time. It is actually quite simple. In the table add two fields. For the purpose of this posting I am going to call them MyPhone and MyAddress but they can be anything you like. Both are text field types but I have also used one text and one memo and it works as well. Once you have these added to the database and the project in ASPM go to that table and open Server Events / Row Inserting and put in this code;

If rsnew("MyPhone") <> "" Then
response.redirect ("xxxx://www.google.com")
Row_Inserting = False
ElseIf rsnew("MyAddress") <> "" Then
response.redirect ("xxxx://www.google.com")
Row_Inserting = False
Else
Row_Inserting = True
End If

Next go the the table Fields view and remove the Caption text so it does not contain anything.

Next edit the Style Sheet under HTML > Styles and use the CSS Editor. Insert this code at the bottom in /* your CSS styles here */
#x_MyAddress {display: none;}
#x_MyPhone {display: none;}

That is it. Generate the new pages. The Spam Bots see these fields because they are in the code but visitors to your website will not because they are hidden with CSS. When a Spam Bot fills in the form it will fill in all fields by default. Because the Spam Bot will see the fields it will fill them in and at that point it will redirect to Google and the form submission is not processed. When a visitor submit the form it goes through fine because they can not see these two fields and therefor can not fill them in allowing the form to be submitted. I have been using this for some time now and I have not received any spam on a form I have added it to. I can not guarantee 100% success but I can report I have had that level in the last 12 months at least.

Good luck,
JW
JAW
 
Posts: 65
Joined: Tue Nov 20, 2012 8:26 pm

Return to User Submitted Tips (ASPMaker)