SHARE
TWEET

Untitled

a guest Jan 12th, 2017 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use strict;
  2. use utf8;
  3. use LWP::UserAgent;
  4. use HTTP::Request::Common;
  5.  
  6. $auth_userid = '1234567';
  7. $auth_password = 'password';
  8. $destination = '+393460346177';
  9. $text = 'test with €';
  10. $format = 'json';
  11. $addr = 'https://api.messagenet.com/api/send_sms/';
  12.  
  13. # SEND SMS
  14. $ua = LWP::UserAgent->new;
  15. $res = $ua->request(POST $addr, [ auth_userid => $auth_userid, auth_password => $auth_password, destination => $destination, text => $text, format => $format ]);
  16.  
  17. #------------
  18.  
  19. # CHECK SMS STATUS
  20. # $message_id comes from the response to the SEND SMS routine
  21. $message_id = '1569557';
  22. $addr = 'https://api.messagenet.com/api/check_sms/';
  23.  
  24. $res = $ua->request(POST $addr, [ auth_userid => $auth_userid, auth_password => $auth_password, message_id => $message_id, format => $format ]);
RAW Paste Data
Top