in reply to lwp autentification

Does this work at your site? It certainly works on the test server at cornell. Note this server comes up if you are feeling lucky and Google for 'basic authentication test site' so it seems fair enough to leave the details in the script.

use LWP::UserAgent; my $url = "http://prism.library.cornell.edu/control/authBasic/authTest +/"; my ($servername) = $url =~ m!://([^/]+)!; my $port = 80; my $realm = 'User: test Pass:'; my $username = 'test'; my $password = 'this'; my $lwp = LWP::UserAgent->new( ); $lwp->cookie_jar( {} ); $lwp->credentials("$servername:$port", $realm, $username, $password); my $response = $lwp->get($url); print $response->as_string;

Replies are listed 'Best First'.
Re^2: lwp autentification
by PierreL (Novice) on Apr 23, 2008 at 08:30 UTC
    I found an '404 not found' when doing this program. I tried to add 445 as port on my own program, but it doestn't help.
    In my own site, it is not this kind of identification, but I must tape this user name on keyboard, and click on a virtual numerical keyboard for password.
      Sorry, this program is working, my very fault