How to send free sms from command line with tiscali
23/03/2005
This simple shell script uses curl to log in to the site and send a messge.
Requirements
- Curl
- tiscali account - free and easy to sign up
Script
#!/bin/sh
COOKIE_FILE="/home/chrisk/cookies.txt";
#USERNAME="username";
EMAIL="username@tiscali.co.uk";
PASSWORD="password";
LOGIN_URI="http://www.tiscali.co.uk/mail/dologin.php";
SEND_URI="http://www.tiscali.co.uk/commscentre/sms/send.php";
COUNTRY_CODE=44;
if [ ! $1 ]
then
echo "useage $0";
exit;
fi
RECIPIENT=$1;
MESSAGE=$2;
#login
curl -c COOKIE_FILE -d "email=$EMAIL&password=$PASSWORD&url=/commscentre/sms/" $LOGIN_URI
#send
curl -b COOKIE_FILE -c COOKIE_FILE -d \
"uname=$USERNAME&countrycode=$COUNTRY_CODE&recipient=$RECIPIENT&message=$MESSAGE" $SEND_URI \
| grep MESSAGE
rm COOKIE_FILE
Install Instructions
- Cut and paste the above into a file say, send_sms.sh
- Replace username, email and passowrd with your tiscali account details
- change permissions to executable: chmod 755 send_sms.sh
- to use, ./send_sms.sh 07947123456 "this is a nice message - thanks tiscali"
Limitations
You can send up to 5 free messages a day per account, the recipient will see 'tiscali' as the number of the sender, so people won't get your phone number. This works as of the date of this article it's subject to tiscali changing their site - let me know if it stop's working.
Disclaimer
Usage of the above is entirely at your own risk and I cannot be hold responsible for any trouble it might get you in or any violation of their terms and conditions!