I need help with contact form

Discussion in 'Web Design and Development' started by denisl, Sep 18, 2009.

  1. denisl macrumors newbie

    Joined:
    Sep 18, 2009
    #1
    I get a lot of spam recently and I think is from my contact page... how do I encode my email address so that It won't be picked up by spam bots?:confused:
     
  2. Angelo95210 macrumors 6502a

    Angelo95210

    Joined:
    Jan 7, 2009
    Location:
    Paris, France
    #2
    Create a form that sends your visitor message through a php file. You can find lots of tutorials for this on the net.

    The next step will be then to add a "capcha" (encoded image) to protect yourself from robots.
     
  3. ss957916 macrumors 6502a

    Joined:
    Jun 17, 2009
    #3
    Can't you just have your email address as an image instead of a text link?
     
  4. nuxx macrumors member

    nuxx

    Joined:
    Jun 5, 2007
    Location:
    Tokyo
    #4
    If your using mailto, then this may help.
     
  5. Dunmail macrumors regular

    Joined:
    Mar 27, 2009
    Location:
    Skipton, UK
    #5
    I "protect" the contact page using a captcha. I got the code from here. Basically there is the one page with the following logic:
    PHP:
    if $_POST is empty, ie first time on pagethen
       create 
    and show captcha with entry form underneath
    else
       
    check contents of $_POST array
       if 
    valid code entered then
          show contact form
       
    else
          
    refresh the page which generates a new captcha
       end 
    if
    endif
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    CAPTCHAs are generally un-user friendly and often have accessibility issues.

    That's an accessibility issue as blind visitors won't be able to access the email address.

    My way is to use a PHP powered contact form. There's various techniques to combat spam using PHP. I've even given briefings on it (not currently publicly viewable). Here's a place to start reading about security for contact forms. There's a number of already built contact forms that you can install relatively easily. Just make sure they offer appropriate security and are accessible.
     
  7. darrylhj macrumors newbie

    Joined:
    Mar 11, 2009
    Location:
    London, United Kingdom
    #7
    Depends how secure you want this to be;

    The best way would be to use the excellent reCaptcha tool (Its easy to add and it will do the best job).

    http://recaptcha.net/

    You could also use Javascript to write the address to the page, most Trawlers dont have Javascript enabled, so this would prevent the email address being read by them (Not foolproof)

    You can put your email as an image, as special characters, or spaced, but they are less effective at stopping spamming and make it more annoying to your users.

    ---

    Create an email alias with a higher spam filtering setting and use that as your public alias, thats what I do.


    Hope that helps, but I would go with the first route, it also helps out a worthy project.
     
  8. denisl thread starter macrumors newbie

    Joined:
    Sep 18, 2009
    #8
    Thanks, I already found www.formsway.com , so I placed a contact form instead... My email address is not visible anywhere now, so zero spam :)
     

Share This Page