Jump to content

Profanity Filter


cooldude832

Recommended Posts

I know I can write out a complete profanity filter, but does anyone have one prebuilt or have any ideas with regex on blocking derivations of words?

the basic idea i got is

<?php
$badwords = array("bad1","bad2","Bad3");
$string = str_replace($badwords,"",$string);
?>

 

lets say bad1 can be used as cat or cated or cating or cats or cates or catly get the idea?

Link to comment
https://forums.phpfreaks.com/topic/59766-profanity-filter/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.