Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: Preventing Comment Spam

  1. #16
    Gimme Fries with that!
    Join Date
    Aug 2004
    Posts
    1,469
    Here is the code for anyone else who wants to try it out, hum over it or improve it. Rememeber to put a check into your php or your comment/forum code wont work at all

    PHP Code:

    <script type="text/javascript">
        
    hidden field or do math */
        
    third='k value=1'
        
    second='n name=submitChec'
        
    other='klaslkdfas'
        
    first='<input type=hidde'
        
    out=first second third
        document
    .write(out '>')
        
    </script> 
    Fire the code within the form to add an extra element. If others have their own methods and dont mind sharing them i would be interested in seeing it, and I am sure folks can learn alot about this. Including myself.
    Last edited by Emancipator; 04-26-2006 at 06:49 AM.

  2. #17
    Registered John's Avatar
    Join Date
    Jul 2005
    Location
    Halifax, Nova Scotia
    Posts
    237
    Very good idea. I think I'm going to go buy the php bible, I know a little php but not enough to make my own applications, I'm getting tired of modifying other CMS's to suit my needs.

  3. #18
    Gimme Fries with that!
    Join Date
    Aug 2004
    Posts
    1,469
    doesnt take alot of php know how to make a cms. Be sure to try this code to prevent comment spamming and see how it holds up.

  4. #19
    Registered
    Join Date
    Dec 2005
    Posts
    180
    Quote Originally Posted by Emancipator
    As you regulars know I love to write code and I do alot of it. I am however stumped on a SIMPLE and effective method to stop comment spam. I have been looking all over the internet for about the last 2 hours doing reading on it and dont see any really good and EASY to implement solution for comment spam. Keep in mind im not using wordpress or any other prebuilt blogging system. I am just looking for some simple way to obfuscate or block those lame-o spammers.

    Feedback with links? Thanks Guys and Gals!
    I made a comments component for Joomla with the following features that relate to spam control:

    Toggle "registered users post only"
    Toggle "force comment preview"
    Toggle linking to commenters website (when turned off, the link is a rel=nofollow
    Toggle "email mandatory"
    Review comments yes/no

    On my website I have all these options turned off, except for the email one. I used to get dozens of spam mails on various topics, then I put in the following function in, and since then I am getting no spam messages at all.
    In the mean while, friendly visitors can publish feedback on the site instantly.

    PHP Code:
    if (eregi($common_spam_pat,$mc_comment_name) || eregi($common_spam_pat,$mc_comment_email) || eregi($common_spam_pat,$mc_comment_homepage) || eregi($common_spam_pat,$mc_comment)) {
          
    mosRedirect("index.php?option=content&amp;task=view&amp;id=$id&amp;Itemid=$Itemid",  _COM_C_SPAM);
      } 
    This functions compares the form input fields to an array of trigger words, these are my trigger words:

    .
    .
    .
    .
    /* Profanity warning for the faint-hearted */
    .
    .
    .
    .
    .

    $common_spam_pat= "sleepdeprivation|sleepdisorders|insomnia|phenterm ine|phentemine|vicodin|hydrocodone|levitra|ultram| ultram|cialis|soma|soma|diazepam|gabapentin|celebr ex|viagra|fioricet|ambien|valium|zoloft|finasterid e|lamisil|meridia|allegra|diflucan|zovirax|valtrex |lipitor|proscar|acyclovir|sildenafil|tadalafil|xe nical|melatonin|xanax|herbal|drugs|lortab|adipex|p ropecia|carisoprodol|tramadol|shemale|gangbang|coc k|anal|orgy|cock|anal|orgy|singleschristian|dating christian|cumeating|creampies|cumsucking|cumswappi ng|cumfilled|cumdripping|krankenversicherung|cumpu ssy|suckingcum|drippingcum|pussycum|swappingcum|ea tingcum|cum|cum|sperm|christiandating|jewishsingle s|sexmeetings|swinging|swingers|personals|sleeping |libido|grannies|mature|enhaement|sexual|gayteen|t eenchat|gaychat|adultfinder|adultfriend|friendfind er|friendadult|finderadult|finderfriend|discreteeo unters|cheatingwives|housewives|sex.|snowballing|f at|fat|diet|pills|weight|supplement|texasholdem|po ker|casino|blackjack|mortgage|refinaing|cashadvae| cashmoney|payday|netwasgroup.com|nic4u.com|wear4u. com|foxmediasolutions.com|liveplanets.com|aeternat ech.com|continentaltirebowl.com|chemsymphony.com|i nfolibria.com|globaleducationeurope.net|soma.125mb .com|mitglied.lycos.de|foxmediasolutions.com|jroun dup.com|feathersandfurvanlines.com|conecrusher.org |sbjbroadcasting.com|edthompson.com|codychesnutt.c om|artsmallforsenate.com|axionfootwear.com|protzon beer.com|candiria.com|bigsitecity.com|coresat.com| istarthere.com|amateurvoetbal.net|alleghanyeda.com |xadulthosting.com|datashaping.com|zick.biz|newpri eton.com|dvdsqueeze.com|xopy.com|webdevboard.com|d evaddict.com|eatoni.com|whiteguysgroup.com|guestbo okz.com|webdevsquare.com|indfx.net|snap.to|2y.net| astromagia.info|jixx.de|freesms";



    You can add any terms to the list to fight spammers that still get through, and you might have to remove some words if the topic of your site in related to any of em.
    Last edited by peach; 04-26-2006 at 11:29 AM.

  5. #20
    Gimme Fries with that!
    Join Date
    Aug 2004
    Posts
    1,469
    great usage peach. I am trying to avoid using a source file to match words against but I am sure many will find your usage very handy.

  6. #21
    Registered Member moonshield's Avatar
    Join Date
    Aug 2004
    Location
    Charlotte
    Posts
    1,281
    Yea thanks, that's great! Your list is pretty good, it even includes some vulgarities I have never even seen.

  7. #22
    Gimme Fries with that!
    Join Date
    Aug 2004
    Posts
    1,469
    thats the fun part of the list method coming up with all the idiotic things people can do and say :P

Similar Threads

  1. Using a SIMPLE match equation Eliminated Comment Spam
    By ! search-engines- in forum General Management Issues
    Replies: 0
    Last Post: 02-13-2006, 07:53 PM
  2. Email Spam Protection
    By Blue Cat Buxton in forum Web Hosting & Servers
    Replies: 0
    Last Post: 06-24-2005, 03:47 AM
  3. How to remove SPAM in my website?
    By minutesloaded in forum General Management Issues
    Replies: 6
    Last Post: 02-09-2005, 03:14 PM
  4. Lots of Spam
    By Dan in forum General Chat
    Replies: 5
    Last Post: 10-19-2004, 10:00 AM
  5. Over 100 Arrested in U.S. Spam Crackdown
    By mobilebadboy in forum Internet Industry News
    Replies: 23
    Last Post: 10-09-2004, 12:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •