in reply to LWP::UserAgent, HTTP proxy, 404 Not Found

I switched your code to use a free proxy i found in an online list and had no problem.

You can see the exact test case below...

#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; use HTTP::Request; use HTTP::Response; my ($request, $response, $ua, $status_line, @url); $ua = LWP::UserAgent->new; $ua = new LWP::UserAgent; $ua->agent("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461 +; YComp 5.0.0.0)"); $ua->env_proxy; $ua->proxy('http', 'http://207.63.245.130:80/'); $ua->timeout(10); @url = ('http://www.netscape.com/', 'http://www.netscape.com/fun/'); foreach my $url (@url) { $request = new HTTP::Request('GET', $url); $request->header('Accept' => 'text/html'); $response = $ua->request($request); $status_line = $response->status_line; print "$url ...\n\t$status_line\n"; }

Replies are listed 'Best First'.
Re: Re: LWP::UserAgent, HTTP proxy, 404 Not Found
by Anonymous Monk on Apr 17, 2003 at 13:59 UTC
    Where is the proxy config file on unix?