Created
November 2, 2012 06:15
Revisions
-
fabriziogiordano created this gist
Nov 2, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ 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