For some reason Opera cannot handle having an anchor in a URL to redirect. I wrote a simple test with a form that has a single hidden field containing a URL with an anchor. When submitted, the form sends the hidden value to be used in a call to the header function, which is supposed to redirect the user to the new URL. It works fine in the other browsers I’ve tested, but for some reason in Opera it just sits waiting forever (or at least several minutes. I haven’t been willing to wait any longer)
Maybe there’s a way to make it work, but I’ve tried escaping the # sign with an HTML character entity, but I got the same behavior. If anyone has any ideas about why Opera doesn’t work with the anchor in the URL I’d be very interested in hearing them.
Here’s the code I used for the test:
<?php
$url = $_POST[ 'url' ];
header( "Location: $url" );
?>
<html>
<form method="post" action="test.php">
<input type="hidden" name="url" value="<?php echo $_SERVER[ 'PHP_SELF' ];
?>#bottom">
<input type="submit" value="Submit">
</form>
<div style="margin-top:500px;margin-bottom:1000px">
<a name="bottom"></a>
<h1>This is the bottom</h1>
</div>
</html>
Anyone that has a blog with comments enabled has probably dealt with the unpleasant experience of checking their e-mail and finding hundreds of comment notifications after being hit by a comment spammer.
A lot of time and effort has been made to resolve this problem and yet the spam continues. I’ve been trying to come up with some ingenious solution that will stop it, but I have yet to come up with anything. I tried looking at it the other way around, so instead of thinking about how to stop it, I thought about what I would like the solution to do for me.
The ideal solution would cost me no time or effort. It would allow all legitimate comments and block all spam comments. Of course that requirement is not complete without a clear definition of what makes a comment legitimate or spam. Some people make a single, manual comment because they want to advertise their web site, and while it’s not nearly as nefarious as many spammers, it’s still spam in my mind. Others would probably say it’s just a regular comment. Having multiple definitions of spam indicates there are several acceptable solutions.
Now we’re left with the issue of how to make it effortless for the blog owner. To me that means blocking it before it ever enters the blog’s data storage, but that also means you run the risk of having valid comments blocked. That’s a big deal because most blog owners appreciate and enjoy receiving comments from their readers.
My solution up to this point has been made possible because of the ability of WordPress to moderate comments based on the number of links. I can then approve those that are valid and delete the rest. Coupled with my slight modification of the moderation page it takes me two clicks to rid my entire blog of comment spam and it never shows up on the site, but that hasn’t curbed the amount of spam I get. Apparently they don’t care that it never shows up on the site, so they continue to do it and I continue to get ticked off by it. It was especially annoying to find that I accidentally deleted a legitimate comment. (sorry Chad) If he hadn’t e-mailed me to ask about it, I never would have known that I had deleted it.
I’m just brainstorming here, but maybe I could ask the commenter a question that only a regular reader would know. If they knew the answer, the comment would be posted immediately. If they didn’t, the comment would be moderated. I’ll have to think about that one. That could be done only for a comment that would otherwise be moderated. There has to be a balance between making it easy for people to comment while at the same time making it hard for spammers to advertise their wares.
Other solutions I have thought of (they were mainly the product of a fit of rage after receiving 250+ comments in one afternoon) include going to the web sites that are in the comment spam and spamming them up the wazoo, but then I realized that traffic is exactly what they’re after, so that wouldn’t be very effective. But maybe you could clog their contact e-mail addresses or web forms. I thought about complaining to their internet service providers or web hosting companies, until I found that many of them are doing it outside of the US and may even be running their own ISPs.
Wouldn’t it be great if we could figure out a way to team up in a full frontal assault on every web site that has ever been used in comment spam? If we could just find a way to make it too much work for them, or not benefit them, they would go away, but as long as they see some benefits from it they will continue to spread their filth.
If you’re a WordPress user, you may be interested in Kitten’s comment spam thoughts where she reviews a few plugins to stop comment spam. There’s also a centralized solution in development which may be effective but we’ll have to wait and see.