1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Do your PHP forms get spammed? - Here's your solution:

Discussion in 'PHP' started by Notting, Nov 28, 2007.

  1. UnknownFury

    UnknownFury Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #21
    Thats actually a pretty good idea. Thanks :)
    However it's not quite as professional as having a verification code ;)
     
    UnknownFury, Dec 9, 2007 IP
  2. xrcode

    xrcode Peon

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #22
    Great idea man
     
    xrcode, Dec 10, 2007 IP
  3. Notting

    Notting Notable Member

    Messages:
    3,210
    Likes Received:
    335
    Best Answers:
    0
    Trophy Points:
    280
    #23
    It is *not* professional having a big pink/yellow/orange and green, number letters and stripes image on your page!


    Notting
     
    Notting, Dec 10, 2007 IP
  4. Notting

    Notting Notable Member

    Messages:
    3,210
    Likes Received:
    335
    Best Answers:
    0
    Trophy Points:
    280
    #24
    Oh yeah, for people wanting to check that the referrer is from the same site, herre is you PHP code:
    
    // Check referrer is from same site.
    
    if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";}
    PHP:
    Enjoy!!

    Notting
     
    Notting, Dec 11, 2007 IP
  5. shaz_again

    shaz_again Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #25
    grt tip, will try it.
     
    shaz_again, Dec 11, 2007 IP
  6. coderbari

    coderbari Well-Known Member

    Messages:
    3,168
    Likes Received:
    193
    Best Answers:
    0
    Trophy Points:
    135
    #26
    This is a really cool Idea.Thanx Notting :D
     
    coderbari, Dec 11, 2007 IP
  7. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #27
    Note that there's no need to use isset() and empty(), in this case. I guess you're using isset() to avoid E_NOTICE errors when the referrer is not set. empty() is a language construct, and won't throw errors or notices when the variable isn't set.
     
    nico_swd, Dec 11, 2007 IP
  8. stickycarrots

    stickycarrots Peon

    Messages:
    4,513
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #28
    Personally...I don't see what's wrong with a captcha, but nice solution anyway :)
     
    stickycarrots, Dec 11, 2007 IP
  9. WeBuster

    WeBuster Member

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #29
    Work great, but not working with the smart bots.
    All the newer bots know this trick. Bots are smarter than you think.

    The better solution is to give the input field this css code:
    
    position:absolute;
    bottom: -200px;
    
    Code (markup):
    to place the field out of screen area.

    This trick is much harder to recognize (for now...).
     
    WeBuster, Dec 11, 2007 IP
  10. ForumJoiner

    ForumJoiner Active Member

    Messages:
    762
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    83
    #30
    I have an phpLD directory that was spammed very often. I removed the eMail input. The bots didn't notice, so in my database appeared submissions with e-mail. I ran once a day a script that removed all the records that had eMail :) (were about 40% of the total records). The other ones were clean, with some minor exceptions.

    I was thinking about dynamically changing the input boxes' names and relative position, so the bots will not know which one to fill and in which order. In this way, I believe it would be very hard for them even to adapt. What do you think?
     
    ForumJoiner, Dec 11, 2007 IP
  11. FHI

    FHI Guest

    Messages:
    660
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #31
    Thanks, I will have to install it on my forum.
     
    FHI, Dec 11, 2007 IP
  12. Notting

    Notting Notable Member

    Messages:
    3,210
    Likes Received:
    335
    Best Answers:
    0
    Trophy Points:
    280
    #32
    How would you go about doing that Gawd?
     
    Notting, May 19, 2008 IP