GhostManSec
Server: Apache
System: Linux instant0279.server.com 2.6.32-696.3.1.el6.x86_64 #1 SMP Tue May 30 19:52:55 UTC 2017 x86_64
User: ptgoldenvisa (520)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/ptgoldenvisa/public_html/Doha/submit_ebook_pt.php
<?php
ini_set('display_errors', 'Off');

require('vendor/autoload.php'); // recaptcha library
$recaptcha_secret="6Lehg70UAAAAAFQXDK9vdhT7jww2ftOnV7-N7zkO";

if(isset($_POST['g-recaptcha-response'])) {
		$recaptcha = new \ReCaptcha\ReCaptcha($recaptcha_secret);
		$resp = $recaptcha->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
		if ($resp->isSuccess()) {
		    // verified!
		    // if Domain Name Validation turned off don't forget to check hostname field
		    // if($resp->getHostName() === $_SERVER['SERVER_NAME']) {  }
            
$email = $_POST['ebook_email'];$Telefone = $_POST['ebook_phone'];$origin = $_POST['ebook_origin'];$ipaddress = $_POST['ebook_ipaddress'];

	$dbuser = "ptgolden_diogo";
	$dbpass = "DiogoCamara2017!";
	$dbname = "ptgolden_contacts";

	$from = "PTGoldenVisa.com <[email protected]>";
	$to = "[email protected]";
	$to = strtolower($email);
	$subject = 'Book a Meeting in Doha and Learn how to get Residence Permit and Citizenship - Ebook - Portugal.';

	$message = '<p>Dear Investor,</p>
	<p>We are glad you are interested in our Golden Visa program. We will be available to meet in Doha on 21-22nd of October 2019 to explain our Investment Program. Please download our E-book - How to Obtain Residence Permit in Europe. To download the ebook you just need to click at the link bellow.</p>
	<p><a href="http://www.ptgoldenvisa.com/Portugal_Visa_Ebook.pdf">HOW TO OBTAIN VISA AND RESIDENCE PERMIT IN PORTUGAL</a></p><br><br/>
    <p>http://www.ptgoldenvisa.com/Portugal_Visa_Ebook.pdf</p>
    <p<a href="http://www.ptgoldenvisa.com/scheduleyourcall/">For further information, please click the link below to schedule a call with our managers:</p>
    </a><p>http://www.ptgoldenvisa.com/scheduleyourcall/</p>
	<p><br/>Our team is specialized in obtaining Residence Visa and Passport in Portugal which allows you to freely travel, study or live in any of the European Countries belonging to Schengen space.</p>
	<p><br /><br />We are ready to clarify your doubts or guide you through all Visa process. We will contact you in order to set up the meeting hour / day and best location.</p><p><br /><br />Kind Regards,</p><p><br /><br />David Machado</p><p><b>PTGoldenVisa</b></p>
<p>Avenida Engenheiro Duarte Pacheco, Edf. Amoreiras Torre 2, Piso 9, Sala 10</p>
<p>1070-103 Lisboa - Portugal</p><p><b>Email:</b>[email protected]</p><p><b>Tel.</b>+351962284098</p><p><b>Website:</b> www.ptgoldenvisa.com</p><p><b>Skype:</b></p><p><p><b></b></p>';
	
	$notific_to = '[email protected]';
	$notific_subject = ucwords(strtolower($email)).' - Formulário Meeting - Doha (DOH)';
	$notific_message = '<p>Hello.</p><p>A request for information just entered the database'.$db_nome.'.  </p><p>telefone -&gt; '.$Telefone.'.<br>Email &nbsp;-&gt; '.strtolower($email).'.<br>Ip &nbsp;-&gt;<a href="https://check-host.net/ip-info?host='.strtolower($ipaddress).'">'.strtolower($ipaddress).'<br></p>';


			$dbhost = "localhost";
			$conn = @mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
			@mysql_select_db($dbname);
			$todayDate = date("Y-m-d g:i a");
			$currentTime = time($todayDate);
			$hours_to_incriase = 7;
			$timeAfterOneHour = $currentTime+(60*$hours_to_incriase)*60;
			//ebook (id, nome, telefone, data, email)
			$query2 = @mysql_query("INSERT INTO `ptgolden_contacts`.`ebook` (`email` ,`telefone` ,`data` ,`origin`,`ipaddress`) VALUES ('".$email."', '".$Telefone."', '".date("Y-m-d H:i:s",$timeAfterOneHour)."', '".$origin."', '".$ipaddress."');");
			$xheaders = "";
			$xheaders .= "From: $from\n";
			$xheaders .= "X-Sender: <$from>\n";
			$xheaders .= "X-Mailer: PHP\n";
			$xheaders .= "X-Priority: 1\n";
			$xheaders .= "Content-Type:text/html; charset=\"iso-8859-1\"\n";
			mail($to, $subject, $message, $xheaders,'-f [email protected]');
			mail($notific_to, $notific_subject, $notific_message, $xheaders,'-f [email protected]');
			header('location: indexok.php');
		} else {
		    $errors = $resp->getErrorCodes();
		    if(!empty($errors)){
			die('Recaptcha validation error: '.implode(',',$errors));
		    }
		}
}
else{
	die('Recaptcha validation error.');
}
?>