Skip to content

Instantly share code, notes, and snippets.

@ork
Last active August 29, 2015 14:02
Show Gist options
  • Save ork/90b04463e70115129267 to your computer and use it in GitHub Desktop.
Save ork/90b04463e70115129267 to your computer and use it in GitHub Desktop.
Send SMS using the Free Mobile gateway.
#!/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