MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/www/imenso.co/demo/resume-maker/download-cv.php
<?php
ob_start();
session_start();
require('include/initalizedb.php');
if($_SESSION['session_id'] == $_GET['u']){
	$file_name = 'users-cv/'.$_GET['u'].'_'.$_GET['r'].'.html';
	//echo file_exists($file_name);
	$pdf_name = 'CV_'.$_GET['u'].'_'.$_GET['r'].'.pdf';
	if(file_exists($file_name)){
	
		require 'pdfcrowd.php';
		
		try
		{   
		    // create an API client instance
		    $client = new Pdfcrowd("rahuljoshi", "5f90615b7443e6a33056d5735159e86c");
		
		    // convert a web page and store the generated PDF into a $pdf variable
		    $pdf = $client->convertURI('http://dev.imenso.co/enhan_cv/'.$file_name);
		
		    // set HTTP response headers
		    header("Content-Type: application/pdf");
		    header("Cache-Control: max-age=0");
		    header("Accept-Ranges: none");
		    header("Content-Disposition: attachment; filename=\"CV.pdf\"");
		
		    // send the generated PDF 
		    echo $pdf;
		}
		catch(PdfcrowdException $why)
		{
		    echo "Pdfcrowd Error: " . $why;
		}
	}else{ echo 'No Download Available for this CV.';}
}else { echo 'Please make Login or Try to download only your CVs.';}
?>