l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
July 21: Defensive computing: Information security for individuals
Next Installfest:
TBD
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2001 Dec 30 16:59

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] LWP module of Perl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] LWP module of Perl



Mark,

You have any idea why this bit of code doesn't work?  I'm trying to access a
secure site:

Is there something special (like use a different package...) to access a https
site using LWP?  My script below works fine going against a http page but not
against an https site.

#!/usr/bin/perl

use strict;
use LWP::UserAgent;

#**********    This Works      ***********
my $uri = URI->new('http://www.yahoo.com');

#**********    This Doesn't    ***********
#my $uri =
URI->new('https://some.securesite.com/cgi/purchase.asp?item_id=700314996616303&i
tem_code=1');

my $ua = new LWP::UserAgent;
$ua->agent("MyAgent/0.1 ". $ua->agent);

my $request = new HTTP::Request('GET' , $uri );
my $response = $ua->request($request);

print $response->content;



Jay Strauss
jstrauss@bazillion.com
(h) 773.935.5326
(c) 312.617.0264

----- Original Message -----
From: "Jay" <jstrauss@bazillion.com>
To: <vox-tech@franz.mother.com>
Sent: Wednesday, December 20, 2000 6:08 PM
Subject: Re: [vox-tech] LWP module of Perl


> You're right, I'm finding examples in the perldoc.  I didn't understand
perldoc
> till now.  Now I'm perldocing everything (and making steady (but slow)
> progress), and learning object oriented perl in the process.
>
> Jay
>
> Jay Strauss
> jstrauss@bazillion.com
> (h) 773.935.5326
> (c) 312.617.0264
>
> ----- Original Message -----
> From: "Micah Cowan" <micah@cowanbox.com>
> To: <vox-tech@franz.mother.com>
> Sent: Wednesday, December 20, 2000 1:37 PM
> Subject: Re: [vox-tech] LWP module of Perl
>
>
> > On Wed, Dec 20, 2000 at 08:59:21AM -0600, Jay wrote:
> > > Do anyone have any experience using the LWP (libwww) module of perl?  I'm
> trying
> > > to use it, but it is wholly short of examples?
> >
> > Are you serious?  There're plenty of examples.  Under the LWP manpage,
> > look under the subtly titled "An Example".  And other examples below that.
> >
> > You will also probably find the LWP::UserAgent manpage to be
> > of value; though that one /doesn't/ have much for examples...
> >
> > ;)
> >
> > Micah
> >
>
>


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.