Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
linkedlistnyc.webscript.io
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