Ok basically its great solution but how to put it in my script
<?php
function rewriter( $body, $case_sensitive=false ) {
include "inc/synodb.php";
include "inc/config.php";
include "inc/badword.php";
$synlist=$body;
$synchar = array("(", ")", "[", "]", "?", ".", ",", "|", "\$", "*", "+", "^", "{", "}");
$synlist=str_replace($synchar," ",$synlist);
$synlist=str_replace(" "," ",$synlist);
$my_synlist = explode(" ",$synlist);
$body = preg_replace('/[\x00-\x1F\x80-\xFF]/', '', $body);
$body = preg_replace('/\b('.implode('|',$badword).')\b/','',$body);
if (sizeof($my_synlist)>0)
{
for($i=0;$i<sizeof($my_synlist);$i++)
{
$synorand = rand(1,100);
if($synorand < $percsyno)
{
$syn_replace=$my_synlist[$i];
$syn_replace=str_replace(" ","",$syn_replace);
$syn_replace=" ".$syn_replace." ";
$syn_replace_target=$syndb[$syn_replace];
if(($syn_replace!="")&&($syn_replace!=" ")&&($syn_replace_target!=""))
{
$body = str_replace($syn_replace,$syn_replace_target,$body);
}
}
}
}
return $body;
}
?>
ok i managed to make it remove non acii characters and predefined words but dont get how to get it to work with your script?