N
Neil Hitchmough
I want to access a page on a remote webserver that is protected by
HTTP authenticate (username and password box) that appears when you go
to the page.
I know that you can do this (using PHP or CGI) but I'm not sure how to
do this in asp.
An example of a page that does do this (just to prove I'm not talking
rubbish) is: http://web-sniffer.net/index.php which does exactly what
I'm on about.
I know how to do this in PHP using:
if ($PHP_AUTH_USER != "user"
or $PHP_AUTH_PW != "pass"):
// Bad or no username/password.
// Send HTTP 401 error to make the
// browser prompt the user.
header("WWW-Authenticate: " .
"Basic realm=\"Protected Page: " .
"Enter your username and password " .
"for access.\"");
header("HTTP/1.0 401 Unauthorized");
But how do I do this in Classic ASP? I'm assuming that i've got to set
the headers when I go to get the page but how?
Regards
Neil
HTTP authenticate (username and password box) that appears when you go
to the page.
I know that you can do this (using PHP or CGI) but I'm not sure how to
do this in asp.
An example of a page that does do this (just to prove I'm not talking
rubbish) is: http://web-sniffer.net/index.php which does exactly what
I'm on about.
I know how to do this in PHP using:
if ($PHP_AUTH_USER != "user"
or $PHP_AUTH_PW != "pass"):
// Bad or no username/password.
// Send HTTP 401 error to make the
// browser prompt the user.
header("WWW-Authenticate: " .
"Basic realm=\"Protected Page: " .
"Enter your username and password " .
"for access.\"");
header("HTTP/1.0 401 Unauthorized");
But how do I do this in Classic ASP? I'm assuming that i've got to set
the headers when I go to get the page but how?
Regards
Neil