in reply to Login form to enable access to htaccess area?

Other people have mentioned how to access password protected pages from a Perl script as a client. Is this what you are asking about? Or do you want a HTML login form and CGI script that provides access to a password protected site? It is possible to have a CGI script redirect to a URL containing the username and password.
my $url = 'http://' . $username . ':' . $password '@' . 'www.example.c +om/some_page.html'; print $cgi->redirect($url);
The problems are that this exposes the password in the URL bar. Putting it in frames can make it less obvious but it is still there. Also, a recent update to IE removes all support for usernames and passwords in http URLs. This completely stops any login script from working.

Replies are listed 'Best First'.
Re: Re: Login form to enable access to htaccess area?
by tilly (Archbishop) on Feb 21, 2004 at 02:31 UTC
    Note that the above trick also works if you are using LWP::Simple. And the update to IE doesn't affect LWP at all.
      Thanks for your help, Tilly, as mentioned on my other replies, unfortunately I cannot install any modules on my server. pip
        Well, you can always figure out how to install things locally as yourself.

        But that aside, how were you planning to access a non-protected area? Whatever tool you had available, there is an excellent chance that name:password@ in the URL will work.