Created
November 2, 2012 06:15
-
-
Save fabriziogiordano/3999033 to your computer and use it in GitHub Desktop.
linkedlistnyc.webscript.io
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
local response = http.request { | |
url = 'http://www.linkedlistnyc.org' | |
} | |
s = response.content | |
lk = string.match(s, "<title>(.*)</title>") | |
local twilio = require('webscriptio/lib/twilio.lua') | |
local ACCOUNTSID = '<YOUR TWILIO ACCOUNT SID>' | |
local AUTHTOKEN = '<YOUR TWILIO AUTH TOKEN>' | |
local response = twilio.sms( | |
ACCOUNTSID, | |
AUTHTOKEN, | |
'<YOUR TWILIO NUMBER>', | |
request.form.phonenumber, | |
lk | |
) | |
if response.statuscode == 201 then | |
return 'Text message sent. '..lk..'\n' | |
else | |
return 'An error occurred. Check the phone number you used.' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment