<? 
//error_reporting(E_ALL); ini_set('display_errors', 1); 
ob_start();

function get_url_contents($url){
	$crl = curl_init();
	$timeout = 5;
	curl_setopt ($crl, CURLOPT_URL,$url);
	curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
	$ret = curl_exec($crl);
	curl_close($crl);
	return $ret;
}
$apiBaseUrl='https://www.globallimos.com';
include("MPDF54/mpdf.php");
$guid=$_REQUEST["guid"];
$rfid=$_REQUEST["rfid"];
$auth=$_REQUEST["auth"];	
$url=$apiBaseUrl."/booking/htmlcontract?guid=".$guid."&rfid=".$rfid."&auth=".$auth."";
//echo $url;
$htmlPDF=get_url_contents($url);
//echo $htmlPDF;
$mpdf=new mPDF('c','A4','','',5,5,5,5,5,5); 
$mpdf->SetDisplayMode('fullpage');
$mpdf->WriteHTML($htmlPDF);
$mpdf->Output();
exit();				
?>