From anonymous, 1 Month ago, written in Bash.
This paste is a reply to Untitled from anonymous
- view diff
Embed
  1. #!/bin/bash
  2.  
  3. account="..."
  4. token="..."
  5. from='...'
  6. to="$1"
  7. maxlength=121
  8. shift
  9.  
  10. data="$*"
  11. (( ${#data} > $maxlength )) && data="${data:0:((maxlength-3))}..."
  12.  
  13. curl -X POST "https://api.twilio.com/2010-04-01/Accounts/$account/SMS/Messages.json" \
  14.      --data-urlencode "From=$from" \
  15.      --data-urlencode "To=$to" \
  16.      --data-urlencode "Body=$data" \
  17.      -u "$account:$token" &> /dev/null
  18.  

Replies to Re: Untitled rss

Title Name Language When
Re: Re: Untitled anonymous bash 1 Month ago.