Current location: Hot Scripts Forums » Programming Languages » ASP » preventing spam on form


preventing spam on form

Reply
  #1 (permalink)  
Old 01-22-07, 01:24 AM
aprogrammer aprogrammer is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
preventing spam on form

I created a contact form that is emailed but it is being spammed very often.

what can I do to prevent this?
does anyone know of any free good scripts for producing an image that the user has to type?
Reply With Quote
  #2 (permalink)  
Old 01-22-07, 02:51 AM
Vicious's Avatar
Vicious Vicious is offline
Community VIP
 
Join Date: Jan 2007
Location: Belgium
Posts: 584
Thanks: 0
Thanked 0 Times in 0 Posts
Personally, I don't like these CAPTCHA images. There's another way to prevent spam: Akismet. URL: http://akismet.com/

I have used it, and with success.
__________________
Jack Bauer makes Chuck Norris cry
Reply With Quote
  #3 (permalink)  
Old 01-22-07, 01:57 PM
koncept
Guest
 
Posts: n/a
captcha.... there is a free one from web wiz...i have to agree on the not liking them much...

vicious: how is akismet? i ahve never used it but have heard varied opinions on it?
Reply With Quote
  #4 (permalink)  
Old 01-26-07, 04:07 AM
GO4TF4CE's Avatar
GO4TF4CE GO4TF4CE is offline
Wannabe Coder
 
Join Date: Apr 2004
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Talking

Use http referrer and check for the page that it comes from. Also remove any generic requests and carriage returns i.e. vbcrlf, chr(31) etc

Never pay for simplicity.
__________________
Intelligence is not knowledge, but the way we use our knowledge.
Reply With Quote
  #5 (permalink)  
Old 01-26-07, 05:35 AM
Vicious's Avatar
Vicious Vicious is offline
Community VIP
 
Join Date: Jan 2007
Location: Belgium
Posts: 584
Thanks: 0
Thanked 0 Times in 0 Posts
Akismet is quite good I think. The "bad" thing is that you need to register at Wordpress to get a development key. Once you have it, you can download a software class that handles all the things for you.

Every time a comment is submitted, you have to send some details to akismet (via that class), end then it returns wether or not it thinks the comment is a spam. So next you store the comment in your database, and you mark if it is a spam or not. This enables you to check later for false positives.

All in all I think it is a good initiative. It easier for the visitors to add a comment, and you still are pretty safe from the spam. If you false negative, you can also send it to Akismet.
__________________
Jack Bauer makes Chuck Norris cry
Reply With Quote
  #6 (permalink)  
Old 01-26-07, 06:20 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
I've found that by disallowing the string "http" you'll screen out about 99.9% of all the spam that tries to get sent.

Simply fail the form with a polite message. A human will be able to see it and work around it (add a space or remove the 'http') and still send the message but the bots won't.

Also, by adding a hidden field (or a field marked "Don't Fill This In") you can then fail the form if that field contains anything, since most bots attempt to fill in every field no matter what.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Reply With Quote
  #7 (permalink)  
Old 01-26-07, 06:22 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Quote:
Originally Posted by End User
Also, by adding a hidden field (or a field marked "Don't Fill This In") you can then fail the form if that field contains anything, since most bots attempt to fill in every field no matter what.
I've been using the hidden field trick for a while and it worked just great for me... didn't get any spam since then.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SPAM via PHP contact form. seroxatmad PHP 6 11-28-06 01:24 AM
email form spam? scatchon The Lounge 6 12-05-05 04:39 PM
checkCheckboxGroup broken after form consolidation ski_woman JavaScript 0 01-12-05 11:00 AM
formmail problem gscraper Perl 12 08-27-04 03:06 AM
Limit the form submission according to time bionicsamir PHP 7 05-09-04 11:10 PM


All times are GMT -5. The time now is 03:54 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.