send SMS via SMS Gateway by www.smsmatrix.com


/ Published in: Perl
Save to your folder(s)

send SMS to any mobile phone number (or a list) worldwide.


Copy this code and paste it in your HTML
  1. use LWP::UserAgent;
  2. use HTTP::Request::Common;
  3.  
  4. my $ua = LWP::UserAgent->new();
  5. my $res = $ua->request
  6. (
  7. POST 'http://www.smsmatrix.com/matrix',
  8. Content_Type => 'application/x-www-form-urlencoded',
  9. Content => [ 'username' => '[email protected]',
  10. 'password' => 'pass7782',
  11. 'callerid' => '12501231233', # optional (for 2-way sms)
  12. 'phone' => '12506063167',
  13. 'txt' => 'this is a test' ]
  14. );
  15.  
  16. if ($res->is_error) { die "HTTP Error\n"; }
  17. print "Matrix API Response: " . $res->content . "\n\n";

URL: http://www.smsmatrix.com/?sms-gateway

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.