LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] sending sms via Blueface

[ILUG] sending sms via Blueface

Gavin McCullagh gmccullagh at gmail.com
Sun Oct 8 22:24:44 IST 2006


Hi,

I'm a big fan of o2sms.  Sadly, not everyone has that luxury, particularly
if they don't have a Vodafone/O2/Meteor account).  Also, some of them
apparently restrict who you can send to and they like to change their site
regularly which can break o2sms for a bit.

If you have a blueface account, you can send text messages via their
website.  They're not free, but the prices are fairly competitive compared
to mobile phones and typing on a keyboard is a lot more convenient than on
a mobile phone.  However, their website is tedious with all that nasty
flash.

Below is a teeny, tiny script which will log you into their website and
send a text message from the command line.  If you call the script bfsms
and put in your blueface username and password, you can do:

	bfsms 0851234567 'Hi, how are you?'

You also need curl and libssl installed.

I'm not sure how reliable Blueface's website and SMS facility are, but this
might be an option for automated sending of system notifications via SMS.
It seems unlikely Blueface would want to thwart scripted use when they get
money for it.  One big downside is that the text message comes from
"blueface", so one can't reply to it, rendering it fairly useless for
conversations.

Still, might be handy some time,
Gavin

##############################################################
#!/bin/bash 

USERNAME="myusername"
PASSWORD="mypassword"

NUMBER=$1
MESSAGE=$2
COOKIEFILE=bfcookies.txt

# login
curl -s -c $COOKIEFILE -d"username=$USERNAME&password=$PASSWORD" https://www.blueface.ie/customers/login.aspx \
 |grep "Account Code: " \
 |sed 's/<[^>]*>//g' \
 |sed 's/^\s*//'

# send sms 
curl -s -b $COOKIEFILE -d"destination=$NUMBER&message=$MESSAGE&sendaction=Send+SMS" https://www.blueface.ie/customers/sms.aspx \
 |grep "Message successfully sent to" \
 |sed 's/<[^>]*>//g' \
 |sed 's/^\s*//'

# logout.
rm $COOKIEFILE

##############################################################





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell