script autotabbing..
function badWords(&$fText){ $badAr=explode("\n",str_replace("\r",'',implode('',file( 'badwords.txt')))); $text=explode(' ',str_replace("\n",' ',str_replace("\r", '',strtolower($fText)))); foreach($badAr as $bV){ foreach($text as $tk=>$tV){ if($bV==$tV or(strlen($bV)>=$GLOBALS['tolerance'][0]&&stristr($tV,$b V)) or(eregi('(['.$GLOBALS['badReg'].']|^)'.$bV.'(['.$ GLOBALS['badReg'].']|$)',$tV)) or(strlen($bV)>=$GLOBALS['tolerance'][1]&&eregi('(['.$ GLOBALS['badReg'].']|^)'.$bV.'(.*)',$tV))){ $rep='*'; $ln=strlen(ereg_replace('['.$GLOBALS['badReg'].'] ','',$tV)); for($i=1;$i<$ln;$i++) $rep.='*'; $repSave=$text[$tk]; $text[$tk]=ereg_replace('[^'.$GLOBALS['badReg'].' ].*[^'.$GLOBALS['badReg'].']',$rep,$tV); $fText=striReplace($repSave,$text[$tk],$fText); } } } }
The King of Admins