Canceling an upcoming reminder
Reminders change and sometimes you have to cancel them ahead of time. This recipe will enable the system to handle that.
Getting ready
The complete source code for this recipe can be found in the Chapter7/Recipe4
folder.
How to do it…
Ok, now we're going to build support for deleting reminders.
Download the Twilio Helper Library from https://github.com/twilio/twilio-php/zipball/master and unzip it.
Upload the
Services/
folder to your website.Upload
sql.sql
to your databaseUpload
config.php
to your website and make sure the following variables are set:<?php session_start(); $accountsid = '';//YOUR TWILIO ACCOUNT SID $authtoken = '';//YOUR TWILIO AUTH TOKEN $fromNumber = '';//PHONE NUMBER CALLS WILL COME FROM $dbhost = '';//YOUR DATABASE HOST $dbname = '';//YOUR DATABASE NAME $dbuser = '';//YOUR DATABASE USER $dbpass = '';//YOUR DATABASE PASS ?>
Upload a file called
listener.php
with the help of the following code:<?php include('Services/Twilio...