<?php
if($_REQUEST['path']!='')
{
@ignore_user_abort();
@set_time_limit(0);

$fullfile="images/companyImages/profile/".$_REQUEST['path'];
$filename=$_REQUEST['path'];

if(!file_exists($fullfile)) {
die("File wasnt set or it didnt exist");
}
$fp = fopen($fullfile,'rb');
header("Content-Type: application/pdf");
header("Pragma: no-cache");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Length: " . filesize($fullfile)); 
header("Accept-Ranges: bytes");
header("Content-Disposition: attachment; filename=\"$filename\"");
while (!feof($fp))
{
echo(@fgets($fp, 8192));
}
fclose ($fp);
exit();

}
?>

