[TAG] (forw) [ILUG] Suggestion to cut down Web site comment spam
Benjamin A. Okopnik
ben at linuxgazette.net
Tue Jan 23 08:57:36 MSK 2007
On Mon, Jan 22, 2007 at 05:39:48PM -0800, Rick Moen wrote:
> ----- Forwarded message from Cian Davis <davisc at skynet.ie> -----
>
> The solution suggested on the Web site was to have a textbox with the
> CSS attribute display set to none. So I have
>
> <div class="hdefrm">
> <textarea name="text" cols="50" rows="5">DO NOT USE THIS
> TEXTBOX</textarea>
> </div>
>
> and in the CSS file
>
> .hdefrm
> {
> display: none;
> }
Definitely elegant, and covers the possibilities - even people with
text-mode browsers are OK, since they'll see the "DO NOT USE" message,
and hopefully will get a clue. My blog got inundated with comment spam a
while back, and although my solution wasn't quite as slick as the above,
it's worked very well.
There are a couple of minor, "mosquito-swatting" level bits of
prevention - easily avoided by any real humans but they stop automated
spam pretty well. The main thing, though, is that I automatically reject
anything that contains Javascript, and I conditionally reject any post
with links in it unless the HTML tag for the latter has a specific mixed
capitalization (this gets "flattened" in the posting process, and is
thus invisible to anyone reading the page or even viewing the source.)
The spam level had originally jumped from zero to several dozen per day;
after I made the change, back in October 2005, it's reached a grand
total of zero.
--
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *
More information about the TAG
mailing list