Does somebody know what is the problem with my script??
Many thanks in advance.
<?
/How many times at a stretch visitor can send mail using the script (2 times default)/
$opss = 50;
/And after what amount of time allow that visitor to send mail again (1 hour default)/
$ok = 3600;
$php_header = "From: $name <$from>\n".
"X-Mailer: Polar Lights Studios/Flash-PHP3 script";
$antispam = $HTTP_COOKIE_VARS["times"];
$message_tosent=$message."\n\n send by $REMOTE_ADDR.";
if ($antispam < $opss){
setcookie("times",$antispam+1,gmdate(time()) +$ok);
if (@Mail($to,
$subject,
$message_tosent,
$php_header)){
echo "&info=Mail sent. Thank you. A confirmation email wil be sent. &";
$confirm_to = $name . "<$from>";
$confirm_header = "From: Customer Service<mail@yoursite.com>";
$confirm_message = "Your message has been sent. \nTo: $to\nSubject: $subject\n";
$confirm_subject = "Email Confirmation";
@mail($confirm_to,$confirm_subject,$confirm_message,$confirm_header);
}else{
echo "&info=Error. Please try later.&";
}
}
else{
echo "&info=Sorry. Spamming not allowed here.&";
}
?>