[thelist] send HTTP authentication from PHP page?

Jason Handby jasonh at corestar.co.uk
Wed Oct 6 15:30:19 CDT 2004


> 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. The latter appraoch is even more of a hassle when 
> you consider that if you're dynamically adding and managing 
> users you have to manage their username/password info in the 
> authentication file as well as in the database.

You could put the PDFs in a directory outside of the web root. And then you
could create an ASPX page (say) that opened the relevant PDF file and
streamed it to the client after sending the appropriate mime type header. I
think this would work...?



Jason



More information about the thelist mailing list