I am trying to get output of a page in admin from a helper file which I need for a cron to convert it into pdf and email:
$html = file_get_contents('http://dltr.org/index.php/admin/dltrpdf_sales_shipment/index/shipment_id/65')
But, I get login page html, as it's a secure admin page. I also tried this PHPCurl but it didn't work. I still got login page html.
Is there any internal function available in Magento that can emulate admin page load and return correct html output (source code)?
FYI, I am using Magento ver. 22.214.171.124.