Created
September 24, 2012 20:43
-
-
Save tealtail/3778257 to your computer and use it in GitHub Desktop.
Simple CDYNE SMSNotify! with ruby
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
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