File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/thewhiteyakleh.com/mail.php
Back
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = strip_tags(trim($_POST["name"])); $phone = $_POST["phone"]; $email = $_POST["email"]; $message = $_POST["message"]; $postfield = '{"name":"'.$name.'","phone":"'.$phone.'","email":"'.$email.'","message":"'.$message.'","subject":"Website Enquiry Hotel the white yak","mailto":"hotelthewhiteyak@gmail.com","mailcc":"support@asiatech.in"}'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.asiatech.in/booking_engine/emailsendpoint.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfield); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json', )); $json =curl_exec($ch); $jsondecode = json_decode($json, true); if($jsondecode['error']!=''){ echo $jsondecode['error']; } else { $previous = $_SERVER['HTTP_REFERER']; echo "<script>setTimeout(function(){window.location.assign('".$previous."');}, 3000);</script>"; echo "Thank You! Your Message has been sent.<br>"; echo "Your will be redirected back to previous page in 3 seconds.<br>"; echo "If you are not redirected yet <a href='".$previous."'>click here</a>."; } } else { echo "There was a problem with your submission, please try again."; } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.16 |
proxy
|
phpinfo
|
Settings