Created
November 14, 2014 22:30
-
-
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.
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
"""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