Re: AW: [PHP] Session files? (Very Techy Questions)

From: Date: Wed, 21 Feb 2001 17:15:32 +0000
Subject: Re: AW: [PHP] Session files? (Very Techy Questions)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41008@lists.php.net to get a copy of this message
At 5:54 PM +0100 2/21/01, Sebastian Stadtlich wrote:
writing an apache module that did the following:
When a file with .pdf is asked for it looks to see if the user is currently in a session (aka 'logged on'). I'm guessing the module can know this by using the HTTP headers. Figuring we can look to see if its giving a cookie with the sid or its part of the URL.
you can handle that with php also, if you don't allow direct download. instead you write a download skript that first checks for login, then sends the proper header to handle the download and then passes the data to the user. you can find information about that in the manual at www.php.net/header
When we post a new issue online we include a url right to the PDF. Not to say we can't change that link to be somthing like: http://www.mysite.com/download.php?file=/TSR/0104/fullissue.pdf However all the old emails that are out there would still point right to the PDF. So I guess we could make apache FWD and PDF GET requests to the following script. Hmmm. Well I'll think about it. Thanks for all the help Sebastian. Mike

« previous php.general (#41008) next »