<?
/*
http://www.thesitewizard.com/
*/
// ------------- CONFIGURABLE SECTION ------------------------
$mailto = '[email protected]' ;
$subject = "feedback" ;
$formurl = "a.ir/contact.php" ;
$errorurl = "b.ir/error.php" ;
$thankyouurl = "c.ir/thank.php" ;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$name = $_POST['name'] ;
$cname = gethostbyaddr($_SERVER[REMOTE_ADDR]);
$email = $_POST['email'] ;
$webname = $_POST['webname'] ;
$sub = $_POST['sub'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
$name = strtok( $name, "\r\n" );
$email = strtok( $email, "\r\n" );
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"\n\n---- Sender Specification -------" .
"\n" .
"IP :" .
$cname .
"\n" .
"Name: " .
$name .
"\n" .
"E-mail: " .
$email .
"\n" .
"Subject :" .
$sub .
"\n\n---- Comments ----------------------------------------\n" .
$comments .
"\n\n---- End Of Commnet ----------------------------------------\n" ;
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\r\n );
header( "Location: $thankyouurl" );
exit ;
?>