Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use utf8;
- use LWP::UserAgent;
- use HTTP::Request::Common;
- $auth_userid = '1234567';
- $auth_password = 'password';
- $destination = '+393460346177';
- $text = 'test with €';
- $format = 'json';
- $addr = 'https://api.messagenet.com/api/send_sms/';
- # SEND SMS
- $ua = LWP::UserAgent->new;
- $res = $ua->request(POST $addr, [ auth_userid => $auth_userid, auth_password => $auth_password, destination => $destination, text => $text, format => $format ]);
- #------------
- # CHECK SMS STATUS
- # $message_id comes from the response to the SEND SMS routine
- $message_id = '1569557';
- $addr = 'https://api.messagenet.com/api/check_sms/';
- $res = $ua->request(POST $addr, [ auth_userid => $auth_userid, auth_password => $auth_password, message_id => $message_id, format => $format ]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement