if(isset($_POST["MESSAGE"]) && $_POST["MESSAGE"]!="" && isset($_POST["NOM"]) && $_POST["NOM"]!="") {
$new_sms.=" \n";
$new_sms.=strtoupper(htmlspecialchars(stripslashes($_POST["NOM"])))." le ".date("d/m/Y à H:i:s",time());
$new_sms.=" \n";
$new_sms.=nl2br(htmlspecialchars(stripslashes($_POST["MESSAGE"])));
$new_sms.=" \n\n";
$new_sms.="
";
if(strpos($_POST["MESSAGE"],"http")>=0 || strpos($_POST["NOM"],"http")>=0) {
} else {
$filename = "livre.txt";
$handle = fopen($filename, "r+");
$contents = fread($handle, filesize($filename));
$new_sms = $new_sms.$contents;
fclose($handle);
$handle = fopen($filename, "w+");
fwrite($handle, $new_sms);
fclose($handle);
}
}
?>

