The following code causes the PDF file to be displayed using ACrobat Reader as you'd expect:
<?php
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
header ('Content-Type: application/pdf');
header ('Accept-Ranges: bytes');
header ('Content-Length: 329320');
include 'PDF-File.pdf';
}
?>
However, if called via an HTTP POST (with the appropriate change in the above code), the browser displays the POST-responder URL in its address bar, but not the document.
Are HTTP responses to POSTs any different than to GETs? Any other idea why this doesn't display the doc?
FYI, the application is to download content (a PDF) only in response to a filled-out form. I don't want to publish a URL that would allow people to bypass the form. If there's a better way to do this...Thanks!