Skip to content

Instantly share code, notes, and snippets.

@mdoff
Created April 13, 2011 17:38
Show Gist options
  • Save mdoff/917990 to your computer and use it in GitHub Desktop.
Save mdoff/917990 to your computer and use it in GitHub Desktop.
#!/bin/bash
#login i haslo do bramki http://smsfree.pl/
smslogin=""
smspass=""
numer=""
msg="przyklad wiadomosci"
web="http://pb.mat.ug.edu.pl/analiza/"
curl $web -s > old
while true;
do
new=`curl "$web" -s`
old=`cat old`
if [ "$new" != "$old" ] ; then
echo poszlo
#sms!
curl -s -d "numer_global=$smslogin&password_global=$smspass" http://www.smsfree.pl/index.php -c ciastek.txt > /dev/null
curl -s -b ciastek.txt -d "what=sms&kody=48&numer=$numer&tariff=1&podpis=48+$smslogin+&submit=Przeslij sms\'a&text=$msg" http://www.smsfree.pl/index.php > /dev/null
rm ciastek.txt
rm old
break
fi
sleep 60
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment