Methods to systematically fight spam

Got an idea, or did we do something that you really find disturbing? Come here and tell us about it and we'll respond.

Methods to systematically fight spam

Postby Billobob » Fri Nov 30, 2018 10:14 am

Spam has become a pretty decent sized problem for this message board. And while thanks to the efforts of our excellent moderators it hasn't become an unmanageable problem a lot of spam still gets through the cracks. The only way to guard against that problem entirely is to set up safe guards. I know this thread is probably redundant but I thought the only responsible thing to do was to compile some ideas on how spam detection can be modified and automated. I also provided some of examples of the code that could be used to do this. So if this is helpful and if the ideas are realistic then please implement them. If they are not then just delete this thread and I'll keep my nose out of the affair.

Method 1: 1."Add Fields That Only Spam Bots Can See and Fill In". With this kind of program you use java and CSS to obscure certain fields from users but which the bots will still be able to see. This method basically relies on the fact that while legitimate browsers view the site through the lens of well the browser bots only read the html. So then once the bot gills in the hidden fields the program will identify and delete the bot. However this kind of program really only works on lower grade spam bots because newer versions can read CSS and java. Then again from what I've seen the bots plagueing us don't appear to be very sophisticated (they don't even translate their ads). So maybe this method could be effective.

Example of method 1:
<meta charset=utf-8>
<title>Simple Form</title>
<link href=styles.css rel=stylesheet>
<script src=""></script>
<label id=email1>Email address: <input id=email></label>
<label id=email2>Email: <input id=email_add></label>
<input type=submit value=submit>
<script src=script.js></script>


#email2 { display: none; }

JavaScript in


function() {
); "

Method 2: Use a reCaptcha code: This code is a common feature on the internet nowadays. It essentially asks a user to either match similar images or to decipher two words. This system can be both easy to implement and is secure against all but the most sophisticated spam bots which I doubt will be employed against this site). However this security feature does have the major downside of making it more difficult for legitimate users to use the site.

reCaptcha code integration : I was going to try to explain how to integrate the code into the site but I realized that google could explain it far better. Here is the google page on how to install reCapthca:

Method 3:Tracking spamming IP addresses. This method allows you to pinpoint which addresses are filling the site with Spam. Then you can block them (here is a site that explains how to actually block the offending IP addresses

Here is the code you can use to find the addresses:

$ip = getenv("REMOTE_ADDR") ;

ip = '<%= Request.UserHostAddress>';

Okay that's it. I hope this post is helpful and if my explanations were subpar then feel free to just directly visit the below sources for more information. Also once again if this post isn't helpful then please delete it.

User avatar
Ranger of the North
Posts: 1066
Joined: Thu Mar 26, 2015 8:50 am
Location: Greenwood the Great.

Re: Methods to systematically fight spam

Postby ElvenArcher » Mon May 06, 2019 6:21 pm

Billobob, is your email listed on TORC up to date? I will send you an email on this. If your email listed in your profile is not up to date, please update and I will resend.
User avatar
Ranger of the North

Posts: 2948
Joined: Fri Mar 02, 2001 4:55 pm

Return to The One Ring

Who is online

Users browsing this forum: No registered users and 1 guest