Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Call URL

by f00li5h (Chaplain)
on Nov 07, 2008 at 13:18 UTC ( #722222=note: print w/replies, xml ) Need Help??


in reply to Call URL

You could LWP::Simple... Although you don't get HTTP response codes, so you'd have to check the page sent back for something to indicate success...

use LWP::Simple; get($smsurl);

@_=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;

Replies are listed 'Best First'.
Re^2: Call URL
by ikegami (Pope) on Nov 07, 2008 at 20:44 UTC

    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;

      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).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://722222]
help
Chatterbox?
[ambrus]: Corion: um, that was me (duh)
[ambrus]: I just can't get you two to cooperate directly because schmorp doesn't want to be in the chatterbox
[ambrus]: maybe you should join his irc channel or something, unless that causes a flame blowup

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2016-12-09 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (151 votes). Check out past polls.