<?
if (strstr(file_get_contents(dirname(__URL__).'/data/banned.dat'), $_SERVER[REMOTE_ADDR])) die('<BANNEDIP>');
foreach ($_POST as $key=>$value){
$_POST[$key]=strip_tags(stripslashes($value));
}
if ($_SERVER["REQUEST_METHOD"] <> "POST") die("You can only reach this page by posting from the html form"); 
if ( (strtoupper(md5($_POST["image"])) == strtoupper($_COOKIE["cap"]))) 
{ 
$h=fopen("data/comments.dat","a");
$byte=substr(md5(time()),0,7);
fwrite($h, "{$byte}[]{$_POST[name]}{$byte}{$_POST[email]}{$byte}{$_POST[website]}{$byte}{$_POST[title]}{$byte}{$_POST[dont_show_email]}{$byte}".str_replace("\n","[nl]",$_POST[message])."{$byte}".time()."{$byte}$_SERVER[REMOTE_ADDR]{$byte}{$_POST[inpurl]}\r\n");
fclose($h);
setcookie('cap','',time()-3600);
} else {
setcookie('cap','',time()-3600);
echo "<INVCAP>";
}
?>