Php forms, how can I stop spam?

Discussion in 'PHP' started by static1635, Aug 21, 2006.

  1. #1
    Hi all

    I have a form on my website (php mail) and I have put a few sections in there to trap spam, does anyone know any more ways I could trap it before it gets sent?

    Thanks

    Justin
     
    static1635, Aug 21, 2006 IP
  2. Perrow

    Perrow Well-Known Member

    Messages:
    1,306
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    140
    #2
    Perrow, Aug 21, 2006 IP
  3. Litewebsite

    Litewebsite Guest

    Messages:
    26
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    To avoid automated form spam you could use a CAPTCHA ( en.wikipedia.org/wiki/Captcha ), random text in an image. Maybe you already have that function?
     
    Litewebsite, Aug 21, 2006 IP
  4. static1635

    static1635 Active Member

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    71
    #4
    i have some Email Injection code on the form as my host warned me that too much php process would end in charges, but yes, I must put image verification on there.

    Is it not just possible to have a form submit with only a string of text input which is displayed on the page? I find the code for image verification a bit over the top.
     
    static1635, Aug 21, 2006 IP
  5. petronel

    petronel Peon

    Messages:
    113
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    petronel, Aug 21, 2006 IP
  6. ip076

    ip076 Peon

    Messages:
    79
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well..the thing about Captcha vs plain text is that most automated crawlers and such can't read the randomly generated image...

    If you put text on there, it could be possible to be read automatically and then your work doesnt mean anything.
     
    ip076, Aug 21, 2006 IP
  7. dvduval

    dvduval Notable Member

    Messages:
    3,372
    Likes Received:
    356
    Best Answers:
    1
    Trophy Points:
    260
    #7
    It is such a pain that people write robots that go around spamming web forms. It seems captcha is the best method for protecting from this, but it really hurts usability, and then people who send these robots should be ashamed of themselves.
     
    dvduval, Aug 21, 2006 IP
  8. static1635

    static1635 Active Member

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    71
    #8
    looks like I better put image verification on there, I'm sick of the spam
     
    static1635, Aug 22, 2006 IP
  9. falcondriver

    falcondriver Well-Known Member

    Messages:
    963
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    145
    #9
    i have a function to check every field for spammy words (viagra, casino, poker, ...) and it just aborts if it finds something. works quite well :)
     
    falcondriver, Aug 24, 2006 IP
  10. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #10
    I've had success by including my forms via a Javascript call. Since Javascript renders client-side, there's no form to spam :)
     
    sketch, Aug 26, 2006 IP
  11. hanso

    hanso Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I do the same on my sites and I didn't receive a single spam mail since I've done it.
     
    hanso, Aug 26, 2006 IP