Content disposition was imperfectly supported in some versions of IE, which could result in it saving with an incorrect extension. No big surprise there.
We built a site which sold PDFs a few years back, and delivered the sales via email out of PHP. Lots of people miss the delivered files due to spam filters not recognising the originating email, so I wouldn't advise that approach today. Currently rebuilding same sales engine using Drupal & Ubercart, which has download sales fairly well covered IMO. On Thu, May 7, 2009 at 4:49 PM, Berend de Boer <[email protected]> wrote: > > >>>>> "Jochen" == Jochen Daum <[email protected]> writes: > > --> /download is a php file and forced with apche directive > --> <ForceType> to > Jochen> be processed as php - looks up ID 1 and checks if this user > Jochen> has paid for this - reads file from disk and streams it > Jochen> through to browser with fpassthrough() - important to use > Jochen> abc.pdf at enbd of URL, otherwise some browsers prompt to > Jochen> save as "index.php" and then not so technical users can't > Jochen> open it. > > It's much simpler to use Content-Disposition for this. If you do this: > > header ('Content-Disposition: attachment; filename=myfile.pdf'); > > and next stream out your PDF, every browser will simply give a prompt to > save or download the document with the proper file name. > > -- > Cheers, > > Berend de Boer > > > > --~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -~----------~----~----~----~------~----~------~--~---
