Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Welcome to the Monastery
 
PerlMonks  

Re: LWP::Simple request through a proxy

by dave_the_m (Monsignor)
on May 04, 2004 at 07:11 UTC ( [id://350289]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to LWP::Simple request through a proxy

Well, the code looks plausible, except that the value in $x should be the URL of the proxy server, while the argument to get() should be the URL of the site you want to get from.
  • Comment on Re: LWP::Simple request through a proxy

Replies are listed 'Best First'.
Re: Re: LWP::Simple request through a proxy
by freak (Initiate) on May 04, 2004 at 07:16 UTC
    is this better ? :
    require LWP::UserAgent; use LWP::Simple; my $ua = LWP::UserAgent->new; $ua->timeout(5); $ua->cookie_jar({ file => "$ENV{'HOME'}/lwp_cookies.dat" }); $ua->proxy('http', "http://google.com"); $content = get("http://flash.udaff.com/"); die "Couldn't get it!" unless defined $content; print "Done\n";

    Edited by Chady -- added code tags.

      Learn to format your text using <code> blocks or I'll stop responding to your posts.

      google.com is not a proxy server.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://350289]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.