At 10:30 2002-04-26 -0400, Greg E Tilton wrote: >I'm hoping that someone can help me with a problem I'm having. I'm still >pretty new at this and have difficulty in following much of what is >discussed on the listserv. I have a script that has always allowed me to >get data from a public web site.
For no particular reason that you'd intuit from the 403 message, the problem seems to go away when I turn on cookies: use strict; use LWP; my $url=""; my $secs=7200; $url="http://www.sce.com/esp/Dlf/F2002.dlf"; my $browser = LWP::UserAgent->new; $browser->cookie_jar({}); # turn on in-memory cookies. $browser->timeout($secs); my $response = $browser->get($url); if ($response->is_success) { open(OUTPUT, ">testsceweb" ) or die $!; binmode(OUTPUT); print OUTPUT $response->content; close OUTPUT; } else { die "Can't get $url -- ", $response->status_line; } -- Sean M. Burke http://www.spinn.net/~sburke/
