Created
November 22, 2015 17:52
-
-
Save Logic-gate/e46a98863e35b73d631e to your computer and use it in GitHub Desktop.
redOxygen.py
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
''' | |
redoxygen is a bulk sms gateway. https://www.redoxygen.net | |
Their developer's page lacks a python example...here it is. | |
''' | |
def sms(message, number): | |
url = 'http://www.redoxygen.net/sms.dll?Action=SendSMS&' | |
param = {} | |
param['AccountId'] = '' | |
param['Password'] = '' | |
param['Email'] = '' | |
param['Recipient'] = number | |
param['Message'] = str(message) | |
url_ = urllib.urlencode(param) | |
url_full = url + url_ | |
param = urllib2.urlopen(url_full) | |
print number, 'code: ' + param.readline() | |
#usage ==> sms('I know what you did last summer', '999999999') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment