Re: Can I fopen() files in .htaccess protected directories?

From: Date: Mon, 08 Apr 2002 19:07:13 +0000
Subject: Re: Can I fopen() files in .htaccess protected directories?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-92108@lists.php.net to get a copy of this message
Hi, actually it is located at a secret URL , just using .htaccess for added protection. Turns out the example I gave does indeed work but unlike in Unix, the password cannot have a ? in it since it is being passed in the URL. "Miguel Cruz" <mnc@stoic.net> wrote in message news:Pine.LNX.4.44.0204070420460.9598-100000@stoic.net... > On Sat, 6 Apr 2002, Dalton Hunter wrote: > > Hi, does fopen() support the opening and reading of remote files in > > directories protected with .htaccess files like ... > > > > > > fopen("http://user:password@www.domain.com/directory/file.php","r"); > > > > If not, is there an alternative way to do this? Thanks! > > If you're only going to be reading it from inside your PHP program, why > not just put the target resource at a secret URL rather than behind > .htaccess password protection? That's pretty much equivalent to a > password. > > miguel >

« previous php.general (#92108) next »