D:\host\scoreman.in\assisiinterschool2025closed\chestflexpdf.php
<?php
//require_once("pdf/autoload.php");
ini_set('max_execution_time', '300');
require_once __DIR__ . '/pdf/autoload.php';
//require_once __DIR__ . '/pdf/paragonie/random_compat/psalm-autoload.php';
$mpdf = new \Mpdf\Mpdf([
'mode' => 'utf-8',
'format' => '8X3',
'margin_left'=>'auto',
'margin_right'=>'auto',
'margin_top'=>'auto',
'margin_bottom'=>'auto',
'orientation' => 'L',
'tempDir' => __DIR__ . '/tmp', // uses the current directory's parent "tmp" subfolder
]);
//$mpdf = new mPDF([
// 'mode' => 'utf-8',
// 'format' => 'A4'
//]);
//$mpdf = m_pdf->load([
// 'mode' => 'utf-8',
// 'format' => 'A4'
//]);
if ($_SERVER['REQUEST_METHOD'] == 'GET')
{
$dt=$_GET["dt"];
if($dt)
{
$url="https://scoreman.in/keraladistricts2023/chestflex.php?dt=".$dt;
//$url="http://localhost/skaterbase20/thank%20you.html";
$opts = array('http'=>array('header' => "User-Agent:MyAgent/1.0\r\n"));
//Basically adding headers to the request
$context = stream_context_create($opts);
$html = file_get_contents($url,false,$context);
//$mpdf->SetTitle($appno.' - RSFI ANNUAL REGN 2020-21');
// $html = file_get_contents($url);
// echo $html;
$mpdf->WriteHTML($html);
$mpdf->Output($dt.' - CHNO FLEX 8ft WIDTH.pdf',\Mpdf\Output\Destination::DOWNLOAD);
$mpdf->Output();
}
}
?>