Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Call URL

by ikegami (Pope)
on Nov 07, 2008 at 20:44 UTC ( #722295=note: print w/ replies, xml ) Need Help??


in reply to Re: Call URL
in thread Call URL

so you'd have to check the page sent back for something to indicate success...

It's easier just using LWP::UserAgent.

use LWP::UserAgent; my $response = LWP::UserAgent->new()->get($smsurl); die if !$response->is_success;


Comment on Re^2: Call URL
Download Code
Re^3: Call URL
by f00li5h (Chaplain) on Nov 08, 2008 at 03:33 UTC

    quoth LWP::Simple::get

    The get() function will fetch the document identified by the given URL and return it. It returns undef if it fails.

    @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;

      Good to know. I was just going by what you said (that the page would need to be checked).

        well, the http request can still "succeed" but not send the sms, so you'll have to forrage in the response body for a The sms was not sent type message...

        @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://722295]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2014-09-20 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (154 votes), past polls