Re: Need Some Direction

From: Date: Fri, 06 Aug 2004 12:48:09 +0000
Subject: Re: Need Some Direction
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-192984@lists.php.net to get a copy of this message
I hate to sound ignorant, but how do I get a file out of a .htaccess protected directory without logging in again? You cant use the normal syntax of http://username:password@domain anymore. Microsoft "fixed" that "bug". Thanks, Aaron "Torsten Roehr" <roehr@zilleon.com> wrote in message news:20040805214404.99871.qmail@pb1.pair.com... > "Aaron Todd" <aaloki88@hotmail.com> wrote in message > news:20040805204218.57433.qmail@pb1.pair.com... > > So far I have made this work. But now I have to ask...what about a pdf > > file? I cant add php code to it so what do I do. I need to be able to > > restrict the pdf so a user can only get to it during a current session. > > > > Thanks again for all the previous posts. You all directed me to a good > > place. My pdf files sliped my mind when I posted. I should have added > this > > problem before. > > > > I hope it can still be done. > > > > Thanks, > > > > Aaron > > Hi Aaron, > > put your pdf file outside of the webroot our in a .htaccess protected > directory. Then read in the file contents, set the appropriate headers and > output the file contents to the browser - this should prompt a download > window. > > PEAR's HTTP_Download is excellent for this job: > http://pear.php.net/package/HTTP_Download > > Regards, Torsten

« previous php.general (#192984) next »