Simple Way How I Prevent Blog Comment Spamming

Discussion in 'HTML & Website Design' started by azlanhussain, Oct 12, 2008.

Thread Status:
Not open for further replies.
  1. #1
    Hi guys,

    Just thought of sharing what I did to stop spam messages in my blog comment. This method is only applicable for self hosted blog system. I will use wordpress blog as a guide but technically it works for others too.

    2 easy steps:

    1) Got to the blog theme editor. Find pages where your comment form resides. In wordpress normally it's in the file comments.php. Find the html tag for '<form ...'.

    Example:
    <form action="<?php echo get_option('siteurl'); ?>/[B]wp-comments-post.php[/B]" method="post" id="commentform">
    Code (markup):
    Change the comment engine that is mentioned in the above <form> tag to anything that you like; ie. 'wp-comments-post.php' to 'wp-comments-postx.php'. Save comments.php & go to next step.

    2) Use FTP software and log in to your server. Locate the file 'wp-comments-post.php' and rename it to 'wp-comments-postx.php'.


    That's all.. :)

    Most people will install a better version of comment system plug-ins that have better security measure such as captcha. But normally this method won't help much especially if you already started getting spam messages. This is because your core comment system is still there. Most spammer does not go through your new system interface to send in their messages instead they use the default system where in most cases is still active regardless whether you use a better system or not.


    Hope that helps.. :)

    Cheers,
     
    azlanhussain, Oct 12, 2008 IP
  2. spinx

    spinx Banned

    Messages:
    63
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Great, will do it soon. Technically why is this method better than others.. Just curious since I was just thinking to install new solution with CAPTCHA function..
     
    spinx, Oct 13, 2008 IP
  3. azlanhussain

    azlanhussain Active Member

    Messages:
    640
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Well, from my finding I noticed that most spaming tool will not visit / read your comment page, instead it send those messages by directly calling the comment script instead. Since they do it in masses, so any blog that returns error while submitting will be left out.

    Anyway that was based on my experience. Of course the best would be having both CAPTCHA and this method.. :)

    Cheers,
     
    azlanhussain, Oct 13, 2008 IP
  4. jack456

    jack456 Peon

    Messages:
    90
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks for this.
    It works fine.
     
    jack456, Oct 15, 2008 IP
  5. winsonyeung

    winsonyeung Active Member

    Messages:
    366
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    68
    #5
    Thanks for this ! i got spam too often, this really helps
     
    winsonyeung, Oct 15, 2008 IP
  6. spinx

    spinx Banned

    Messages:
    63
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6

    Thanks mate. It works great :) You deserve a +ve rep..
     
    spinx, Oct 15, 2008 IP
Thread Status:
Not open for further replies.