On 12 Nov 2003 11:02:58 -0800,
trubisz@yahoo.com (Joe Trubisz) wrote:
[color=blue]
>Hi...
>
>Problem: I have PDF's sitting on somewhere (not on the client), and,
>using a database command, a selection list of what PDF's they have
>stashed is displayed. When the person selects the PDF they want
>displayed, I want to do *something* in PHP which allows me to display
>the PDF on their screen.
>
>Problem is: have absolutely no idea if this is even possible, or if it
>is, how to go about it.[/color]
I would do this by having a cache directory within your web root, and
write the code to (a) move the PDF file to the cache directory
(re-naming it on the way to something unique), and then (b) call
header() and redirect to the file...
You could open the PDF file as a stream and deliver it to the client
too, but I like the cache method myself - for instance, if you had a
hundred people looking at the same PDF, if you keep a little database
table of what is in the cache, you only cache one file and deliver it
a hundred times.
Just my two penneth :)