この PHP スクリプトのスパム防止を手伝ってくれる人はいますか? また、このスクリプトを使用すると、2 つのメールが届きます。1 つは空で、もう 1 つは結果が記載されています。
<?php
$to = "voodoocastde@gmail.com";
$subject = "Registrierung auf voodooCAST.de";
$headers = "From: Form Mailer";
$forward = 0;
$location = "";
$date = date ("l, F jS, Y");
$time = date ("h:i A");
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";
if ($_SERVER['REQUEST_METHOD'] == "POST") {
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
else {
foreach ($_GET as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "\n";
}
}
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
header( 'Location: http://www.voodoocast.de/confirm.php' ) ;
}
?>