0
I need to open a . pdf file directly in the browser. The problem is that this file is generated from an external link and already comes with download option.
I’m trying to open it this way:
<?php
$file = $_GET['arquivo']; // aqui to pegando o link por onde o arquivo é gerado
header('Content-Disposition: inline; filename="'.$file.'"');
readfile("{$file}");
?>
But of the PDF reading error.
Follow the link to the file I need to open: https://boletoonline.caixa.gov.br/ecobranca/SIGCB/imprimir/0934772/14000000110730423
Displays the following errors:
Warning: readfile(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /home/suains55/public_html/webservicecaixa/view.php on line 8
Warning: readfile(): Failed to enable crypto in /home/suains55/public_html/webservicecaixa/view.php on line 8
Warning: readfile(https://boletoonline.caixa.gov.br/ecobranca/SIGCB/imprimir/0934772/14000000110730423): failed to open stream: operation failed in /home/suains55/public_html/webservicecaixa/view.php on line 8
Can anyone help?