Last active
August 29, 2015 14:02
-
-
Save ork/90b04463e70115129267 to your computer and use it in GitHub Desktop.
Send SMS using the Free Mobile gateway.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## User config | |
FREE_USER=${FREE_USER:-'MY_LOGIN'} | |
FREE_PASS=${FREE_PASS:-'MY_API_KEY'} | |
## Go go go | |
FREE_URI='https://smsapi.free-mobile.fr/sendmsg' | |
while read line; do | |
if ! [ -z "${line}" ]; then | |
curl -G -k -v "${FREE_URI}" \ | |
--data-urlencode "user=${FREE_USER}" \ | |
--data-urlencode "pass=${FREE_PASS}" \ | |
--data-urlencode "msg=${line}" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment