%PDF- %PDF-
Direktori : /home/eirtvhdf/public_html/pay/make-payment/ |
Current File : //home/eirtvhdf/public_html/pay/make-payment/index.php |
<?php echo isset($_POST['q']); if(isset($_POST['q']) && $_POST['q']=='generate'){ $whitelist = array( '127.0.0.1', '::1' ); if(!in_array($_SERVER['REMOTE_ADDR'], $whitelist)){ $serverName = "/"; } else { $serverName = "http://localhost:8080/eirlogo/"; } /*foreach ($_POST as $key => $value) { echo '<p>'.$key.': '.$value.'</p>'; }*/ $emailadd = $_POST['clientemail']; $amount = $_POST['amount']; $package = $_POST['package']; /*Encodeing*/ function base64_url_encode($input){return strtr(base64_encode($input), "+/=", "-_,");} $encoded=urlencode('http://localhost:8080/eirlogo/testing/test.php?pay='.$amount); $encoded=base64_url_encode($encoded); // echo $encoded.'<br>'; /*Encodeing*/ /*Email*/ $headers = "From: EIRLogo < care@eirlogo.com >\n"; //$headers .= "Cc: testsite < mail@testsite.com >\n"; $headers .= "X-Sender: EIRLogo < care@eirlogo.com >\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); $headers .= "X-Priority: 1\n"; // Urgent message! $headers .= "Return-Path: care@eirlogo.com\n"; // Return path for errors $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; $msg = 'Kindly follow link: '.$serverName.'/pay/make-payment/?q=dopayment&p='.$encoded; // echo $msg; mail($emailadd,"EirfoTech Discount Payment",$msg); /* if(mail($emailadd,"EIRLogo Discount Payment",$msg,$headers)){ header('Location: '.$serverName.'/pay/?err=0'); } else { header('Location: '.$serverName.'/pay/?err=1'); } */ /*Email*/ } if(isset($_GET['q']) && $_GET['q']=='dopayment') { /*Decoding*/ function base64_url_decode($input){return base64_decode(strtr($input, "-_,", "+/="));} $decode = base64_url_decode($encoded); $decode = urldecode($decode); echo $decode.'<br>'; /*Decoding*/ } ?>