私はstackoverflowが初めてで、私の質問に対する答えが見つかりませんでした。php で mail() コードを保護して、最終的に大量のメールが送信されるようになる bcc を追加できないようにするにはどうすればよいですか? 私の Web サイトでは、PHP の mail() サービスを使用して、サイトに新しいコメントが入力されたときにメールを送信しています。bccを削除するなど、改ざんを防ぐ最善の方法は何ですか? 私がこれまでに持っているものは次のとおりです。
function mres($input){
if (get_magic_quotes_gpc()){
$input = stripslashes($input);
}
return mysql_real_escape_string($input);
}
$name = strip_tags(mres($_POST['name']));
$comment = strip_tags(mres($_POST['comment']));
$to = 'myself@gmail.com';
$subject = 'Website - comment';
$body = 'A new comment has been entered on the website.'."\n\n"."$name".' said: '."\n\n"."$comment";
mail($to,$subject,$body);