Alrighty, many of us/you may know that you can popup an http challenge logon box to authenticate your users similer to the way you would with .htaccess
header('WWW-Authenticate: Basic realm="My Private Stuff"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
Thats all fine and dandy.
My question is, can something almost in reverse be achived? Can I use an html form to pass username and password to some php code and have it give the client some headers for it to store the user/pass and use it when entering an .htaccess protected area on the same site? I don't like the popup, but want the security of .htaccess .
I know I could redirect to http://username:password@host.com , but do not want to do that. There has to be a way to format the headers, thats how the server / browser does it anyway. Does anyone know?
Thanks!