> does anyone know where i can find a script that removes profanity and
> replaces them with a character (****)?
> my boos just came down on me because i told him we already had one, but
> apparently it doesnt work.
There was a thread just a few days ago on this forum about this...
So, search the archives for really good answers first.
Probably the first question you have to ask yourself is where/when to
filter? On input, before output, some other weird time?
The filter itself is fairly simple. You get your $words from somewhere,
like a database or file or maybe you could put a hidden microphone in the
PHB's office. That way, you'd have the words he's most likely to try when
he tests your filter. :-)
Then, you iterate through that list of words and do something not unlike
this:
while (list(,$word) = each($nasties)){
$text = pregi_replace($word, '&%#@$^', $text);
}
Odds are really good I got the pregi_replace arguments wrong -- I usually
do, and then I have to go read http://php.net/pregi_replace
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]