Skip to content

Instantly share code, notes, and snippets.

@Logic-gate
Created November 22, 2015 17:52
Show Gist options
  • Save Logic-gate/e46a98863e35b73d631e to your computer and use it in GitHub Desktop.
Save Logic-gate/e46a98863e35b73d631e to your computer and use it in GitHub Desktop.
redOxygen.py
'''
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