|
Тема |
E-mail injektion Как да се отърва |
|
Автор |
ge_or_gi (непознат
) |
|
Публикувано | 18.11.05 13:20 |
|
|
забраниха използването на скрипта които използвам за получаване на е-маили от клиенти. причинява много СПАМ дайте идея как да го оправя
<?php //send contact e-mail
$response ="Fields marked in bold are obligatory";
$mail_to = 'бла бла @ бла бла.ком;
if (isset($_REQUEST["first_name"]) && isset($_REQUEST["last_name"]) && isset($_REQUEST["email"])){
if(ereg('propertyservicesfuengirola\\.com',$_SERVER['PHP_SELF'])) {
$mail_subject = "MPS Web Contact Form - propertyservicesfuengirola.com";
} elseif(ereg('propertyservicesmarbella\\.com',$_SERVER['PHP_SELF'])) {
$mail_subject = "MPS Web Contact Form - propertyservicesmarbella.com";
} else {
$mail_subject = "MPS Web Contact Form";
}
// get services into csv format for email
$i = "";
$s = $_REQUEST['service'];
if($s !="") {
foreach ($s as $v) {
$i .= "$v, ";
}
}
$services = (ereg_replace(",$","",$i));
// done //
$mail_body = "Contact form<BR>
<BR>
Name : ".$_REQUEST["title"] ." ". $_REQUEST["first_name"] ." " .$_REQUEST["last_name"] ."<BR>
Company : ".$_REQUEST["company"]." (optional) <BR>
E-mail : ".$_REQUEST["email"]."<BR>
Country : ".$_REQUEST["country"]."<BR>
Telephone : ".$_REQUEST["phone"]."<BR>
Mobile : ".$_REQUEST["mobile"]." (opt)<BR>
Fax : ".$_REQUEST["fax"]." (opt)<BR>
PROPERTY
Area : ".$_REQUEST["area"]."<BR>
Postal Address : ".$_REQUEST["postal_address"]."<BR>
No. Rooms : ".$_REQUEST["bedrooms"]."<BR>
Aprox. Size : ".$_REQUEST["size"]."<BR>
Status : ".$_REQUEST["status"]."<BR>
SERVICES
Services Interested in : ".$services."
How Found : ".$_REQUEST["find_us"]." - specifically: ". $_REQUEST["specifically"] ."<BR>
Comments: ".$_REQUEST["comments"]."<BR>
<BR>";
// headers to make html mail, including other mail headers
$mail_headers ="From:".$_REQUEST["email"]."\nReply-To:".$_REQUEST["email"]."\nContent-Type: text/html; charset=iso-8859-1";
// mail($mail_to, $mail_subject, $mail_body, $mail_headers);
$response = "Form sent successfully!";
}
?>
копие от скрипта
|
| |
|
|
|