How do I protect my forum against spam?

前端 未结 14 1580
既然无缘
既然无缘 2020-12-28 23:46

I have a forum on a website I master, which gets a daily dose of pron spam. Currently I delete the spam and block the IP. But this does not work very well. The list of block

相关标签:
14条回答
  • 2020-12-29 00:39

    In a guestbook app I wrote, I implemented two features which prevent most of the spam:

    • Don't allow POST as the first request in a session

    • Require a valid HTTP Refer(r)er when posting

    0 讨论(0)
  • 2020-12-29 00:40

    In my experience, the best easy defenses come from just doing something "non-standard". If you make your site non-standard, this makes it so that any automated spam would have to be coded specifically for your site, which (no offense) probably isn't worth the effort. Note that if the spam is coming from human spammers, there's not really anything you can do that won't also stop legitimate posters. So the goal is to find a solution that will throw away any "standard" posts - that is, "fill out the whole form and push submit".

    A couple examples that come to mind of things that you could try:

    • Have a hidden form field with a name that sounds like something a spammer would want to fill out, like "website" or "homepage" or something like that. If the form field gets filled out, throw away the message instead of posting it, because it was a bot automatically filling in the whole form, even invisible fields.
    • You don't have to use a "real" captcha, but even something simple like "Enter the following word backwards: <random backwards word>" or "What is the domain name of this website?". Easy for a human to do, but it would require a fairly complex bot to figure out what to fill in.
    0 讨论(0)
提交回复
热议问题