Re: LWP and authentication

2008-09-11 Thread ssinn
On Aug 22, 4:48 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > ssinn wrote: > > > I am currently writing a script that will connect to a URL, > > authenticate itself and GET information to the site. > > I am using this code out of the Perl &LWPbook but it is failing. > > > #!/usr/bin/perl -w > > > use

Re: LWP and authentication

2008-08-22 Thread Rob Dixon
ssinn wrote: > > I am currently writing a script that will connect to a URL, > authenticate itself and GET information to the site. > I am using this code out of the Perl & LWP book but it is failing. > > #!/usr/bin/perl -w > > use strict; > use warnings; > use LWP; > use URI; > > # This authent

LWP and authentication

2008-08-22 Thread ssinn
I am currently writing a script that will connect to a URL, authenticate itself and GET information to the site. I am using this code out of the Perl & LWP book but it is failing. #!/usr/bin/perl -w use strict; use warnings; use LWP; use URI; # This authenticates my $browser = LWP::UserAgent->ne

Re: LWP and authentication

2003-02-14 Thread Dan
Thanks that worked perfect!! And a little bit of print $request->content() and it is done! Thanks Again!! david wrote: Dan Muey wrote: Something like :: use LWP::Simple; my $content = authenticate_and_get($url, $user, $pass); print $content; IE if you got $url in a browser it will prompt

Re: LWP and authentication

2003-02-14 Thread david
Dan Muey wrote: >Something like :: > > use LWP::Simple; > my $content = authenticate_and_get($url, $user, $pass); > print $content; > > IE if you got $url in a browser it will prompt you for your username and > password. > try: #!/usr/bin/perl -w use strict; use LWP::UserAgent; my $agent

LWP and authentication

2003-02-14 Thread Dan Muey
This works to get your average file :: use LWP::Simple; my $content = get($url); print $content; is there a way to give a user name and password if $url is .htaccess protected? Something like :: use LWP::Simple; my $content = authenticate_and_get($url, $user, $pass); print $content; IE if y