SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Spam Prevention Contact Form

    Hello,

    I am looking for all possible means to prevent spam from reaching the email through a contact form. I want to make a brick wall.

    I program my sites in PHP; however, suggestions of any sort are welcome.

    Many Thanks,
    Caleb

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Tokens, CAPTCHA and hidden fields.

    Tokens: When someone loads your form, generate a unique token, put it in the user's session, and put it in the form as a hidden input field. When processing the form, check that the token matches the session. This will block bots that do not send session cookies or try to submit the form multiple times.

    CAPTCHA: The "what does this scribbly text says" test. Add one easily with recaptcha.com.

    Hidden fields: Create a text field in the form and use CSS to make it hidden from the user. If the field has a value when the form is processed, then it was likely filled in by a bot, and not by a human, since the human couldn't see it.

  3. #3
    SitePoint Member
    Join Date
    Jul 2009
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply dan.

    I also read an article where a developer changed the POST URL once a particular field had been clicked. Seems like a good idea.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •