Originally posted by ReggieX:
<STRONG>A faster/better way would be to just password protect the folders with .htaccess, and send the right URL to the clients you want. When they go to the URL provided, a standard login dialog box will appear.
You need shell access (either Telnet or SSH) to the web server, but it's pretty easy to do:
Good tutorial</STRONG>
Thanks ReggieX, but I'm not too keen on the standard input box. Call me retentive, but I'd prefer to make my own snappy-looking form. Besides, the passwords from these dialogs are sent as plain text over the network which isn't super-safe.
I've already got the folders protected with .htaccess - my ISP has a great CGI which allows full administration of users / groups / permissions, etc.
But I really wanted to know if I could do a 'soft' authentication with PHP - by setting the variables $PHP_AUTH_USER and $PHP_AUTH_PW from the data I've just entered in a login form
So using a header location to redirect to the correct folder, I'm hoping that a user will stay authenticated if the login and password variables match values within the .htaccess / .htpassword files.
I haven't tried this yet - time is at a premium at the moment! I just wanted to talk this through aloud to see if anyone could confirm / deny this or had any bright ideas.