Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Get Timout with LWP

by ecuguru (Monk)
on Jun 20, 2004 at 19:12 UTC ( [id://368319]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use LWP::Simple;
      my $url = 'http://site.com/file.html';
        print "Getting\n";
      my $content = get $url;
        print "Done\n";
    
  2. or download this
    Getting
    Done
    Getting
    Hang
    
  3. or download this
    use LWP::UserAgent;
    use LWP;
    ...
    $ua->agent($ident);        # set the id
    $ua->timeout($timeout);    # timeout
    my $req = new HTTP::Request GET => 'http://site.com';
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://368319]
Approved by Zaxo
Front-paged by fuzzyping
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-16 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found