Topic: force download of .pdf files (Read 726 times)
Global Moderator
Internet Junkie
Gender:
Posts: 1807
9006 credits Members referred : 6
« on: Oct 08, 2007, 12:21:50 PM »
After getting annoyed a few too many times after opening .pdf file in the browser window I looked into forcing the download so the 'save as' window pops up after clicking on a .pdf link (like it does when clicking on a link to a .zip file)
I found a way to force the download and added a counter as well. You can see the complete script on my php tutorial site here: force .pdf download
Global Moderator
Internet Junkie
Gender:
Posts: 1807
9006 credits Members referred : 6
« Reply #5 on: Oct 08, 2007, 02:08:09 PM »
That last header isn't working Olaf. I've send an e-mail to php.net to ask how to use that header, since it isn't in the php manual. They must have missed it somehow...
That last header isn't working Olaf. I've send an e-mail to php.net to ask how to use that header, since it isn't in the php manual. They must have missed it somehow...
Nico, don't send this to php.net, headers are coordinated by the W3C