Re: [PHP] comments function being spammed, how do I stop it?
On 27 Aug 2008, at 15:37, tedd wrote: At 3:37 PM +0100 8/26/08, Stut wrote: In my experience most spam can be blocked by case-insensitively checking for "[url" and "there that don't include URLs. -Stut Well... that would block me many times from providing comment for I often not only comment but back my point up with a link to a demo. Obviously if you want to accept links from users then this won't work for you, but for blocking comments from spam bots that hit every form they can find I've found nothing better than refusing comments with links. A half-way-house would be to refuse anything with more than n links where n is reasonable for the content you're expecting. Most spam comments try to include a large number in each posting. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comments function being spammed, how do I stop it?
At 3:37 PM +0100 8/26/08, Stut wrote: In my experience most spam can be blocked by case-insensitively checking for "[url" and "there that don't include URLs. -Stut Well... that would block me many times from providing comment for I often not only comment but back my point up with a link to a demo. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comments function being spammed, how do I stop it?
tedd wrote: > At 3:14 PM -0700 8/25/08, Jim Lucas wrote: >>Here is the function that I added to a generic guest book script. >>It works great for me. I have a predefined list of sexual, >>pharmaceutical, rude, vulgar, etc... words that I have in the >>spamwords.dat file. >> >>function is_spam($str) { >> $data = './data/spamwords.dat'; >> $spamword = file($data); >> $str = strtolower($str); >> foreach ($spamword AS $word) { >> $word = trim($word); >> if ( ! empty($word) && // Blank line >> strpos($word, 0, 1) != '#' && // Comment line >> strpos($str, strtolower($word)) !== false ) { // Compare >> return true; >> } >> } >> return false; >>} >> >>Just setup the spamwords.dat file to have each word/string that you >>want to reject for separated on each line. >> >>-- >>Jim Lucas > > > Will you share your spamwords.dat file? I get too excited trying to > type them in myself. :-) > > This reminds me (if I have my story correct) that recently a > Christian web site had a similar filter except it filtered news they > scrubbed off other site/sources. One of their routines checked for > offensive words and then replaced them with PC words. > > This receive national attention when their site changed Tyson Gay's > name to Tyson Homosexual. > > Cheers, > > tedd > I figure their spamfilter would have permanent epilepsy if they took a feed from the Scunthorpe Evening Telegraph's site at http://www.thisisscunthorpe.co.uk/ Cheers -- David Robley Phobia: what's left after drinking 2 out of a 6 pack Today is Prickle-Prickle, the 20th day of Bureaucracy in the YOLD 3174. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comments function being spammed, how do I stop it?
Stut wrote: On 26 Aug 2008, at 15:23, tedd wrote: At 3:14 PM -0700 8/25/08, Jim Lucas wrote: Here is the function that I added to a generic guest book script. It works great for me. I have a predefined list of sexual, pharmaceutical, rude, vulgar, etc... words that I have in the spamwords.dat file. function is_spam($str) { $data = './data/spamwords.dat'; $spamword = file($data); $str = strtolower($str); foreach ($spamword AS $word) { $word = trim($word); if ( ! empty($word) && // Blank line strpos($word, 0, 1) != '#' && // Comment line strpos($str, strtolower($word)) !== false ) { // Compare return true; } } return false; } Just setup the spamwords.dat file to have each word/string that you want to reject for separated on each line. -- Jim Lucas Will you share your spamwords.dat file? I get too excited trying to type them in myself. :-) This reminds me (if I have my story correct) that recently a Christian web site had a similar filter except it filtered news they scrubbed off other site/sources. One of their routines checked for offensive words and then replaced them with PC words. This receive national attention when their site changed Tyson Gay's name to Tyson Homosexual. In my experience most spam can be blocked by case-insensitively checking for "[url" and "include URLs. -Stut Let me try again. I will only supply a link to the file instead of including it for every spam trap to catch... :) http://www.cmsws.com/examples/data/spamwords.dat -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comments function being spammed, how do I stop it?
On 26 Aug 2008, at 15:23, tedd wrote: At 3:14 PM -0700 8/25/08, Jim Lucas wrote: Here is the function that I added to a generic guest book script. It works great for me. I have a predefined list of sexual, pharmaceutical, rude, vulgar, etc... words that I have in the spamwords.dat file. function is_spam($str) { $data = './data/spamwords.dat'; $spamword = file($data); $str = strtolower($str); foreach ($spamword AS $word) { $word = trim($word); if ( ! empty($word) && // Blank line strpos($word, 0, 1) != '#' && // Comment line strpos($str, strtolower($word)) !== false ) { // Compare return true; } } return false; } Just setup the spamwords.dat file to have each word/string that you want to reject for separated on each line. -- Jim Lucas Will you share your spamwords.dat file? I get too excited trying to type them in myself. :-) This reminds me (if I have my story correct) that recently a Christian web site had a similar filter except it filtered news they scrubbed off other site/sources. One of their routines checked for offensive words and then replaced them with PC words. This receive national attention when their site changed Tyson Gay's name to Tyson Homosexual. In my experience most spam can be blocked by case-insensitively checking for "[url" and "that don't include URLs. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comments function being spammed, how do I stop it?
At 3:14 PM -0700 8/25/08, Jim Lucas wrote: Here is the function that I added to a generic guest book script. It works great for me. I have a predefined list of sexual, pharmaceutical, rude, vulgar, etc... words that I have in the spamwords.dat file. function is_spam($str) { $data = './data/spamwords.dat'; $spamword = file($data); $str = strtolower($str); foreach ($spamword AS $word) { $word = trim($word); if ( ! empty($word) && // Blank line strpos($word, 0, 1) != '#' && // Comment line strpos($str, strtolower($word)) !== false ) { // Compare return true; } } return false; } Just setup the spamwords.dat file to have each word/string that you want to reject for separated on each line. -- Jim Lucas Will you share your spamwords.dat file? I get too excited trying to type them in myself. :-) This reminds me (if I have my story correct) that recently a Christian web site had a similar filter except it filtered news they scrubbed off other site/sources. One of their routines checked for offensive words and then replaced them with PC words. This receive national attention when their site changed Tyson Gay's name to Tyson Homosexual. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comments function being spammed, how do I stop it?
Barnaby Walters wrote: Hi there! my comments function for my website (at www.waterpigs.co.uk/php/phpTest.php) is being spammed, what would be your sugguestions of a way to deal with it? I was thinking of something to do with searching the strings of comments contained in the database for rude words, etc, but I'm unsure as to how to do it. Any help would be appreciated greatly. Thanks, Barnaby _ www.waterpigs.co.uk [EMAIL PROTECTED] Here is the function that I added to a generic guest book script. It works great for me. I have a predefined list of sexual, pharmaceutical, rude, vulgar, etc... words that I have in the spamwords.dat file. function is_spam($str) { $data = './data/spamwords.dat'; $spamword = file($data); $str = strtolower($str); foreach ($spamword AS $word) { $word = trim($word); if ( ! empty($word) && // Blank line strpos($word, 0, 1) != '#' && // Comment line strpos($str, strtolower($word)) !== false ) { // Compare return true; } } return false; } Just setup the spamwords.dat file to have each word/string that you want to reject for separated on each line. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comments function being spammed, how do I stop it?
2008/8/25 Barnaby Walters <[EMAIL PROTECTED]>: > my comments function for my website (at www.waterpigs.co.uk/php/phpTest.php) > is being spammed, what would be your sugguestions of a way to deal with it? > I was thinking of something to do with searching the strings of comments > contained in the database for rude words, etc, but I'm unsure as to how to > do it. Akismet. One of the classes for interfacing with it is here: http://www.achingbrain.net/stuff/php/akismet -- http://www.otton.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] comments function being spammed, how do I stop it?
Captcha? On 8/25/08, Barnaby Walters <[EMAIL PROTECTED]> wrote: > > > Hi there! > > my comments function for my website (at www.waterpigs.co.uk/php/phpTest.php) > is being spammed, what would be your sugguestions of a way to deal with it? > I was thinking of something to do with searching the strings of comments > contained in the database for rude words, etc, but I'm unsure as to how to > do it. > > Any help would be appreciated greatly. > > Thanks, > Barnaby > _ > www.waterpigs.co.uk > [EMAIL PROTECTED] > > > > -- Thiago Henrique Pojda
[PHP] comments function being spammed, how do I stop it?
Hi there! my comments function for my website (at www.waterpigs.co.uk/php/ phpTest.php) is being spammed, what would be your sugguestions of a way to deal with it? I was thinking of something to do with searching the strings of comments contained in the database for rude words, etc, but I'm unsure as to how to do it. Any help would be appreciated greatly. Thanks, Barnaby _ www.waterpigs.co.uk [EMAIL PROTECTED]