File manager - Edit - /home/autoph/public_html/data03252025consolidation/app/mail/test.php
Back
<?php include_once("../../cfg/db.php"); include('send_mail.php'); if(!isset($_REQUEST['email'])){ echo "invalid email"; exit; } $email = trim($_REQUEST['email']); sendMail( "$email", 'Subject', 'Hello World', $variable); function sendMail($post_email,$subject, $message,$variable){ // $site_link = str_replace("https","http",$variable['site_link']); $site_link = $variable['site_link']; $url = $site_link.'app/mail/mail.php'; $data = array('email' => $post_email,'subject' => $subject ,'message' => $message); // use key 'http' even if you send the request to https://... $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data) ) ); $context = stream_context_create($options); $result = file_get_contents($url, false, $context); if ($result === FALSE) { /* Handle error */ } var_dump($result); } ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.08 |
proxy
|
phpinfo
|
Settings