[thelist] send HTTP authentication from PHP page?

Greg Holmes greg.holmes at gmail.com
Thu Oct 7 08:35:06 CDT 2004


Noah St.Amand wrote:

>For example, if you have a password protected area of
>your site accessed via session-based authentication,
>there is no way of transparently linking to password-protected
>PDFs. You either have to put the PDFs in an unprotected
>directory, or you have to make the user re-enter his or
>her username and password. 

Well, you can use an ASP or PHP page to do the authentication,
then stream the PDF file with the correct http headers.

This sort of works, if you do some hacks to deal with IE's
confusion about PDFs that don't end in ".pdf", and it's
propensity to request the URL multiple times to figure
out what it is instead of just looking at the #$%$# headers.

Greg Holmes


More information about the thelist mailing list