Perl SMS Script
Supplied by: Scott Penrose (http://scott.dd.com.au/wiki/AussieSMS)

Code Sample:

#!/usr/bin/perl
use LWP::Simple;
use URI::Escape;
use CGI qw/:standard/;

# WARNING - there is no security on input here (to, from, message) - this is a
# demonstration script only.

# Your parameters
my $mobileID = "YourMobileID";
my $password = "YourPassword";

# The API URL
my $baseurl ="http://api.aussiesms.com.au/";

# Variable parameters (in this case from CGI Get or Post or Command line)
my $text = uri_escape(param('message'));
my $to = param('to');

# Send an SMS (every call must have valid ID and Password)
my $url = "$baseurl?sendsms&mobileID=$mobileID&password=$password&to=$to&text=$text&from=$mobileID&msg_type=SMS_TEXT";
my $ret = get($url);

# Check response
if ($ret =~ /MessageID:(\d+)/) {
# Valid response, now check status of SMS message
my $mess_id = $1;
$url = "$baseurl?querymessage&mobileID=$mobileID&password=$password&msgid=$mess_id";
$ret = get($url);
if ($ret =~ /(\d)+:(.+)$/) {
print "Message Status for $mess_id: $1 - $2\n";
}
else {
print "send message failed for $mess_id - $ret\n";
}
}
else {
# Invalid response - assume authentication has failed
print "Authentication failure: $ret\n";
}

----------------------------------------------------

HTML Sample:

<html>
<body>
<form method="get" action="/cgi-bin/aussiesms.cgi">
To: <input name="to">
Message: <input name="message">
<input type="submit">
</form>
</body>
</html>

Home | Services | Your Account | Support | Contact Us | SMS Coverage

SMS Gateway | Email SMS | Email SMS Notification | 2 Way SMS | Web SMS | Bulk Text SMS

PHP SMS Script | VB .Net SMS Script | VBScript SMS | ColdFusion SMS Script | C# SMS Script | Perl SMS Script

Extras | Mobile Phone Ringtones | Mobile Phone Wallpapers | Mobile Phone Games | Text Messages

Privacy Policy | Terms Of Use | Email Marketing

AussieSMS © Copyright 2004-2010. All rights reserved.