I want to find a plugin about spam filter.
first i want to build the word library in my local site.
and can cut words.
such as while has (fuc.k you) in the word library.and the user submit (fuc.k ** you).so certainly it won't match.
and efficient.
(the dot between fuc.k is to stop the codecall from filter this word,and of course it's an example how to ingore the filter)
OR
if you don't know any plugin , you can also write your thought about how program.
i hope you guys know what i mean.god bless.
2 replies to this topic
#1
Posted 29 March 2011 - 07:12 PM
|
|
|
#2
Posted 29 March 2011 - 10:23 PM
Plugin to what system?
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#3
Posted 03 April 2011 - 07:24 AM
I would recommend you try something like this. It's how I've done it in the past:
<?php
// A list of all the words you want to ban
$filterlist = array('silly', 'stupid', 'wicked');
// The message you want to filter
$message = 'That silly girl went on a date with that stupid stoopid boy who was wicked.';
// Run the filter function
echo (filtermessage($filterlist,$message));
/* -------------------------------------------------------------------------------
Function: filtermessage
Description: Filter out a selection of words from a message and replace
them with a word of your choice
Usage: filtermessage( array('silly'), 'silly person', 'removed');
------------------------------------------------------------------------------- */
function filtermessage($filterlist, $message, $replace = '[removed]'){
foreach($filterlist as $currentword){
// Remove any words straight out from the list
$message = eregi_replace(trim($currentword), ' ' . $replace . ' ',$message);
// Get each individual word
$words = explode(' ', $message);
// Check each word for a phonetic match
foreach($words as $word) {
if(metaphone(trim($word)) == metaphone(trim($currentword))) {
$message = eregi_replace($word, ' ' . $replace . ' ',$message);
}
}
}
return $message;
}
?>
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









