有人可以幫我防垃圾郵件證明這個PHP腳本嗎?另外,當我使用這個腳本時,我收到兩封電子郵件,一封是空的,另一封是結果。整合電子郵件驗證
<?php
$to = "[email protected]";
$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') ;
}
?>
你是什麼意思「垃圾郵件證據」? – woz 2012-07-24 17:03:25
垃圾郵件證明將意味着您只能輸入有效的電子郵件地址,並且無法將腳本插入到該表單或其他東西 – 2012-07-24 17:07:53