<?php
function check($mess){
$mess=str_replace("|","I",$mess);
$mess=str_replace("||","I",$mess);
$mess=htmlspecialchars($mess);
$mess=str_replace("'","&#39;",$mess);
$mess=str_replace("\"","&#34;",$mess);
$mess=str_replace("\$","&#36;",$mess);
$mess=str_replace("$","&#36;",$mess);
$mess=str_replace("\\","&#92;", $mess);
$mess=str_replace("`","", $mess);
$mess=str_replace("^","&#94;", $mess);
$mess=str_replace(":","&#58;",$mess);
$mess=str_replace("%","&#37;", $mess);
$mess=preg_replace("|&#58;|",":",$mess,3);
$mess=mysql_real_escape_string(stripslashes(trim($mess)));
return $mess;
}
?>
