<?php
$app_name = '';
$app_mobile = '';
$app_email = '';
$opdnum = '';
$app_docid = '9125';
$app_depid = '925';
$app_date = '';
$amount = '';
$orderid = '';
$ordertrn_ref_no = '';
$ordertrn_req_date = '';
$RTNMSG = '';
$mail_url = "https://lifelinehospitalkerala.com/book-an-appointment/mail.php?name=".$app_name."&contact=".$app_mobile."&email=".$app_email."&opnumber=".$opdnum."&docid=".$app_docid."&depid=".$app_depid."&appdate=".$app_date."&amount=".$amount."&ordernumber=".$orderid."&transno=".$ordertrn_ref_no."&transdate=".$ordertrn_req_date."&paymsg=".$RTNMSG;
$arrContextOptions = array(
    "ssl" => array(
        "verify_peer" => false,
        "verify_peer_name" => false,
    ),
);
$mailresponse = file_get_contents($mail_url, false, stream_context_create($arrContextOptions));
print_r($mailresponse);
$responseData = json_decode($mailresponse, true);
print_r($responseData);
if ($responseData !== null) {
    // Access the 'mailresp' value
    $mailresp = $responseData['mailresp'];
    
    // Use the 'mailresp' value
    echo "Mail Response: " . $mailresp;
} else {
    // Handle JSON decoding error
    echo "Failed to decode JSON response.";
}
// echo $mailresponse.mailresp;
// $mailresponsed = json_decode($mailresponse, true);
// print_r($mailresponsed);
// echo $msg = "<h2 class='sub-heading-one text-center'>".$mailresponsed['mailresp']."</h2>";
?>