Re: PHP logging into htaccess Auth

From: Date: Tue, 09 Mar 2004 02:05:53 +0000
Subject: Re: PHP logging into htaccess Auth
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-179854@lists.php.net to get a copy of this message
On Tuesday 09 March 2004 07:50, daniel@electroteque.org wrote: > > username:password@domain.com/directory/to/protect [snip] > Is there any other possible way to login dynamically with a script to > access files ? If not i'll have to store the files outside the web > directory and header load them. These are flash video files i am loading > externally into a main flash container which is why i need to put the login > information into the url to access the file. In particular i dont want a > cookie set so then the user can then be able to access the directory after > that, i only want the script to be able to access it . How exactly does your protection scheme work? If you're using PHP to read files (from a .htaccess protected directory) there is no need to use: username:password@domain.com/directory/to/protect PHP is not subjected to the restrictions imposed by .htaccess files and can read protected files directly. If on the other hand you're sending: username:password@domain.com/directory/to/protect to the browser so that it can seamlessly download the protected files then no real protection has been achieved because anyone can link to those 'protected' files not just your script. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Money and women are the most sought after and the least known of any two things we have. -- The Best of Will Rogers */

« previous php.general (#179854) next »