RE: [PHP] secure files acess

From: Date: Fri, 16 Aug 2002 20:46:52 +0000
Subject: RE: [PHP] secure files acess
Groups: php.general 
Request: Send a blank email to php-general+get-113018@lists.php.net to get a copy of this message
Thankyou Robert, THat is a great and easy way to do it. What if I need to initiate a download to the user? -----Original Message----- From: Robert Cummings [mailto:robert.cummings@webmotion.com] Sent: Friday, August 16, 2002 2:06 PM To: David Buerer Cc: 'php-general@lists.php.net' Subject: Re: [PHP] secure files acess David Buerer wrote: > > I have a bunch of files which need to be kept secure. I need to allow a user > access to them them based on a criteria which I can programmatically > determine. > > My question, is how can I allow the user to download or view only one file > on my computer without allowthem to just enter the URL into their browser of > the file and view it? Have a php script authenticate the user, then if authenticated, use the reafile() function to output it to the user directly. Since PHP can see more than just the web space the files just need to reside outside of the websapce. Cheers, Rob. -- .-----------------. | Robert Cummings | :-----------------`----------------------------. | Webdeployer - Chief PHP and Java Programmer | :----------------------------------------------: | Mail : mailto:robert.cummings@webmotion.com | | Phone : (613) 731-4046 x.109 | :----------------------------------------------: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `----------------------------------------------'

« previous php.general (#113018) next »