spamming using my sendmail.php file - how to stop them?

A

Anonymous

Guest
your could try using a cookie LOL but they may or may not find out about it

Code:
<?php 
// This script extracts the data submitted via the contact form
// sends an e-mail to a specified address and redirects to a confirmation page
if(!($_COOKIE["timebomb"] == "true")){
extract($_POST); // extracts all info from the form 

$to1="danielchisca@yahoo.com"; // set destination e-mail 1 
$to2="leads@newmetro.com"; // set destination e-mail 2 

$subject="Atlanta-Gutter.com - ".$sService."\n"; // define de SUBJECT line 

$msg="Atlanta-Gutter.com ".$sService."\n"; // start compiling the message 
$msg.="-------------------\n\n"; 
$msg.="From: ".$sName." (".$sCompany.")\n"; 
$msg.="Phone: ".$sField3."\n"; 
$msg.="E-mail: ".$sField4."\n\n"; 
$msg.="-- Notes --\n"; 
$msg.=$sNotes."\n"; 
$msg.="--\n"; // end message 

mail($to1,$subject,$msg,"From: ".$sName." <".$sField4.">"); // send e-mail 1 
mail($to2,$subject,$msg,"From: ".$sName." <".$sField4.">"); // send e-mail 2 

header('Location: thankyou.php'); // redirect to thankyou.php
setcookie("timebomb", "true", time() + (60 * 3));// 3 min delay
}

?>


Please use Code tags or else you will not be helped.

[ code ][ /code ]
 
Back
Top