Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^3: HTTP GET with a timer (embedded pdf)

by taint (Chaplain)
on Dec 12, 2013 at 14:29 UTC ( #1066852=note: print w/replies, xml ) Need Help??

in reply to Re^2: HTTP GET with a timer (embedded pdf)
in thread HTTP GET with a timer

Greetings, lastbronx4u

If I were you, and attempting to deduce what's wrong with the script. I'd probably drop/comment the timer lines. Until I got the script working. I might also dump the 2 cache lines as well. I think you want to add

to whatever the mimetype for PDF documents are. In fact, you might even better choose raw, or choose binmode. Given that the PDF is binary, and embeded in the web page.

I'll do a little experimenting. If I find anything better/useful. I'll update this post.

Best wishes.


Maybe the following will provide what you need -- worked for me:

use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => 'http://full-url-you-want-or-are-requesting'); # following line defines what will be saved to your machine $res = $ua->request($req, "html-filename-dot-html-part--index-dot +-html-for-example"); if ($res->is_success) { print "ok\n"; } else { print $res->status_line, "\n"; }

Yes. What say about me, is true.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1066852]
[perldigious]: w4st3 n0t w0t n0t
thezip is randomly reminded of Hugo's_house_of_ho rrors

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2017-03-24 18:16 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (305 votes). Check out past polls.