<?php
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
[COLOR=Green]header("Expires: ".gmdate("D, d M Y H:i:s", time() + 3600)."GMT");[/COLOR]
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
?>
<?php
$nickname = str_replace ("\n"," ", $nickname);
$nickname = str_replace ("<", " ", $nickname);
$nickname = str_replace (">", " ", $nickname);
$nickname = str_replace ("fuck", "-", $nickname);
$nickname = str_replace ("suck", "-", $nickname);
$nickname = str_replace ("ass", "-", $nickname);
$nickname = str_replace ("&", "and", $nickname);
$nickname = stripslashes ($nickname);
$message = str_replace ("\n"," ", $message);
$message = str_replace ("<", " ", $message);
$message = str_replace ("&","and", $message);
$message = str_replace ("fuck", "-", $message);
$message = str_replace ("suck", "-", $message);
$message = str_replace ("ass", "-", $message);
$message = str_replace ("vittu", "-", $message);
$message = str_replace ("mulkku", "-", $message);
$message = str_replace ("perkele", "-", $message);
$message = str_replace ("helevetti", "-", $message);
$message = str_replace ("pillu", "-", $message);
$message = str_replace ("penis", "-", $message);
$message = str_replace ("bitch", "-", $message);
$message = str_replace ("lutka", "-", $message);
$message = stripslashes ($message);
$p=gmdate("d M H:i");
?>
&output=
<?php
$chat_file = "shout.txt";
$chat_lenght = 40;
$max_single_msg_lenght = 1000;
$max_file_size = $chat_lenght * $max_single_msg_lenght;
$file_size= filesize($chat_file);
if ($file_size > $max_file_size) {
$lines = file($chat_file);
$a = count($lines);
$u = $a - $chat_lenght;
for($i = $a; $i >= $u ;$i--){
$msg_old = $lines[$i] . $msg_old;
}
$deleted = unlink($chat_file);
$fp = fopen($chat_file, "a+");
$fw = fwrite($fp, $msg_old);
fclose($fp);
}
$msg = str_replace ("\n"," ", $message);
$msg = stripslashes ($msg);
if ($msg != ""){
$fp = fopen($chat_file, "a+");
$fw = fwrite($fp, "<font color=\"#FFFFFF\"><b>$nickname:($p)<br></b></font> $msg\n");
fclose($fp);}
$lines = file($chat_file);
$a = count($lines);
$u = $a - $chat_lenght;
for($i = $a; $i >= $u ;$i--){
echo $lines[$i];
}
?>