...

View Full Version : login and password window



stryper
07-16-2003, 10:09 AM
someone knows how to generate that small window that apears when you go into a member area of a secure place that ask you for a login and password, like window does.

tommysphone
07-16-2003, 11:43 AM
Its all to do with .htaccess and htpassword files.

I am not 100% sure on the how's and when tos etc but I am sure someone can elaborate.

STDestiny
07-24-2003, 12:41 AM
If you use a password script, you would have to use javascript to have a password window pop up, then have the form in the pop up load send the information back to the main window and close itself.

-Andrew

photoman
08-06-2003, 12:42 AM
You may also try using ASP and there is a way (though I never have tried it) to get similar security and access as using Windows NT

CrAzYCoDeR969
08-06-2003, 12:53 AM
You can use HTTP headers to make that dialog come up:

WWW-Authenticate: Basic realm="Place To Access"

You can do it like this with PHP:



// user/pass not given yet
if(!isset $_SERVER['PHP_AUTH_USER'])
{
// if user submits info, page is re-requested with vars set,
// if user hits cancel then code after first header() is displayed
header('WWW-Authenticate: Basic realm="Place to access"');
header('HTTP/1.0 401 Unauthorized');
die('You hit cancel button');
}
else // user/pass submitted through dialog
{
echo "You entered {$_SERVER['PHP_AUTH_USER']} as username.<br>";
echo "You entered {$_SERVER['PHP_AUTH_PW']} as password.<br>";
}

oracleguy
08-06-2003, 06:28 AM
You can do it with ASP/IIS too. You just change the permissions on the files or folders.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum