文件操作 - contact.php96652144
返回文件管理
返回主菜单
删除本文件
文件: /home/tecnoht/public_html/studiostampi--com/contact.php96652144
编辑文件内容
<?php if ( ! isset($_POST["recaptcha_challenge_field"])) exit('No direct script access allowed'); require_once('lib/recaptchalib.php'); $privatekey = "6Lcn-s4SAAAAAMJ_8ZAN2UclTYvKzbUFjkvrBavd"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly //die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." ."(reCAPTCHA said: " . $resp->error . ")"); header('Location: contatti.php?error=CaptchaFailed'); } else { // Your code here to handle a successful verification require("lib/HTMLPurifier.standalone.php"); $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); $mail_body = ''; $mail_body_html = ''; foreach ($_POST as $key => $content) { if(preg_match('/^txt/',$key) == 1) { $mail_body .= str_replace('txt', '', $key).': '.$purifier->purify($content)."\n"; $mail_body_html .= '<b>'.str_replace('txt', '', $key).'</b>: '.$purifier->purify($content)."<br/>"; } } require("lib/class.phpmailer.php"); require("lib/class.smtp.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "smtp.idtogether.com"; // specify mail server $mail->SMTPAuth = true; // turn on SMTP authentication // $mail->SMTPSecure = "ssl"; // sets the prefix to the servier // $mail->SMTPSecure = "tls"; // sets the prefix to the servier $mail->Port = 25; // set the SMTP port $mail->Username = "test@tecnodata.co.it"; // SMTP username $mail->Password = "test123"; // SMTP password $mail->From = $_POST['txtMail']; $mail->FromName = "Website contact form"; $mail->AddAddress("info@".$_SERVER['HTTP_HOST']); //send a copy to the owner of the website $mail->AddAddress($_POST['txtMail']); //send a copy to the sender $mail->AddReplyTo($_POST['txtMail']); $mail->WordWrap = 50; // set word wrap to 50 characters $mail->IsHTML(true); // set email format to HTML $mail->Subject = "Message from ".$_SERVER['HTTP_HOST']." contact form"; $mail->Body = $mail_body_html; $mail->AltBody = $mail_body; if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; sleep(5); header('Location: contatti.php'); } header('Location: email_sent.html'); } ?>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件