Over a million developers have joined DZone.

Send Sms In Perl Via Sms Gateway Www.smsmatrix.com

·
Send SMS via SMS Gateway provided by www.smsmatrix.com


use LWP::UserAgent;
use HTTP::Request::Common;

my $ua = LWP::UserAgent->new();
my $res = $ua->request
(
 POST 'http://www.smsmatrix.com/matrix',
 Content_Type  => 'application/x-www-form-urlencoded',
 Content       => [ 'username' => 'user888@yahoo.ca',
                    'password' => 'pass7782',
                    'callerid' => '12501231233', # optional (for 2-way sms)
                    'phone' => '12506063167',
                    'txt' => 'this is a test' ]
);

if ($res->is_error) { die "HTTP Error\n"; }
print "Matrix API Response: " . $res->content . "\n\n";

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}