Skip to content

Instantly share code, notes, and snippets.

@fabriziogiordano
Created November 2, 2012 06:15
Show Gist options
  • Save fabriziogiordano/3999033 to your computer and use it in GitHub Desktop.
Save fabriziogiordano/3999033 to your computer and use it in GitHub Desktop.
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