File manager - Edit - /home/asiatechinc/public_html/asiatechinc-websites/seabreezebeachresortmurud.in/mail.php
Back
<?php if(isset($_POST['formsubmit'])){ $url = 'https://www.google.com/recaptcha/api/siteverify'; $privatekey = '6LegqtAZAAAAANtYkplhCszYhGHF1kwM_thyyinK'; $ch0 = curl_init(); curl_setopt($ch0, CURLOPT_URL, $url."?secret=".$privatekey."&response=".$_POST['g-recaptcha-response']."&remoteip=".$_SERVER['REMOTE_ADDR']); curl_setopt($ch0, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch0, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch0, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch0, CURLOPT_HTTPHEADER, array( 'Content-Type:application/json', )); $gresponse = curl_exec($ch0); $data = json_decode($gresponse, true); if($data['success'] == 1){ $name = strip_tags(trim($_POST["name"])); $email = strip_tags(trim($_POST["email"])); $phone = strip_tags(trim($_POST["phone"])); $message = strip_tags(trim($_POST["message"])); $postfield = '{"subject":"Query from Website Hotel Aradhana", "name":"'.$name.'", "email":"'.$email.'","phone":"'.$phone.'", "message":"'.$message.'", "mailto":"aditya@asiatech.in", "mailcc":"aditya@asiatech.in", "mailbcc":"aditya@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']!=''){ //header('Location: index1.php?captcha=other'); echo '<script type="text/javascript">window.location.href = "contact.php?captcha=other";</script>'; } else { //header('Location: index1.php?captcha=yes'); echo '<script type="text/javascript">window.location.href = "contact.php";</script>'; } } else { //header('Location: index1.php?captcha=no'); echo '<script type="text/javascript">window.location.href = "contact.php?captcha=no";</script>'; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.06 |
proxy
|
phpinfo
|
Settings