in reply to Re: Re: A tool that logs and then parses the returned HTML.
in thread A tool that logs and then parses the returned HTML.

In that case just use the basic UserAgent and provide the credentials in the script.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Re: Re: Re: A tool that logs and then parses the returned HTML.

Replies are listed 'Best First'.
Re: Re: Re: Re: A tool that logs and then parses the returned HTML.
by marynella (Novice) on Dec 30, 2003 at 13:55 UTC
    Thank! It works!
    #d:\Perl\bin\perl.exe use HTTP::Request::Common ; use LWP::UserAgent; use LWP 5.64; my $browser = LWP::UserAgent->new; $browser->credentials( 'www.mysite:port', 'real name', 'user' => 'passwd' ); my $url = 'http://www.site/mylogpage'; my $response = $browser->get($url); die "Error: ", $response->header('WWW-Authenticate') || 'Error accessing', # ('WWW-Authenticate' is the realm-name) "\n ", $response->status_line, "\n at $url\n Aborting" unless $response->is_success; $content = $response->as_string; some_function($content);