Skip to content

Instantly share code, notes, and snippets.

@csik
Created November 14, 2014 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csik/d1bd387cf813277e5dfe to your computer and use it in GitHub Desktop.
Save csik/d1bd387cf813277e5dfe to your computer and use it in GitHub Desktop.
IP addresses are limited to 75 texts per day. Phone numbers are limited to 3 texts every 3 minutes. To report abuse or request increased limits, please contact ianw_textbelt at ianww.com.
"""IP addresses are limited to 75 texts per day.
Phone numbers are limited to 3 texts every 3 minutes.
To report abuse or request increased limits, please contact
ianw_textbelt at ianww.com."""
import httplib, urllib
def send_text(numstring, message):
params = urllib.urlencode({'number': numstring, 'message': message})
headers = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"}
conn = httplib.HTTPConnection("textbelt.com:80")
conn.request("POST", "/text", params, headers)
response = conn.getresponse()
return response.status, response.reaso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment