5% assure discount from here only

Showing posts with label SMS. Show all posts
Showing posts with label SMS. Show all posts

Thursday, January 27, 2011

(16) How to send SMS from perl script?

Solution :

To send sms you need a gateway that is willing to accept your message and dispatch to the respective networks. For this you need to register and stuff which is a tedious process.

It is very simple to send a SMS from perl script, there are so many ways to do that. Out of them i am going to post some of the ways for the same.

(1) Send SMS via 160By2

To use this script only 2 thing are required :

(i) CPAN module Net::SMS::160By2
(ii) An A/C with http://www.160by2.com/

use Net::SMS::160By2;

my $obj = Net::SMS::160By2->new($username, $password);

$obj->send_sms($msg, $to);

This is how you can send SMS to any mobile number in
India, Kuwait, UAE, Saudi, Singapore, Philippines & Malaysia at present.

(2) Send SMS via Way2SMS

To use this script only 2 thing are required :

(i) CPAN module Net::SMS::WAY2SMS;
(ii) An A/C with http://www.way2sms.com/

use Net::SMS::WAY2SMS;

my $s = Net::SMS::WAY2SMS->new(
'user' => 'xyz' ,
'password' => 'xyzpassword',
'mob'=>['98********', '9**********']
);

$s->send('Hello World');