Skip to content

Instantly share code, notes, and snippets.

@tealtail
Created September 24, 2012 20:43
Show Gist options
  • Save tealtail/3778257 to your computer and use it in GitHub Desktop.
Save tealtail/3778257 to your computer and use it in GitHub Desktop.
Simple CDYNE SMSNotify! with ruby
require 'net/http'
require 'uri'
uri = URI("http://sms2.cdyne.com/sms.svc/SimpleSMSsend")
params = {
:PhoneNumber => 'YourPhoneNumber',
:Message => 'Hello From SMSNotify!',
:LicenseKey => 'YourLicenseKey'
}
uri.query = URI.encode_www_form(params)
res = Net::HTTP.get_response(uri)
puts res.body if res.is_a?(Net::HTTPSuccess)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment