Retrieving a list of upcoming reminders
Now we will learn how to retrieve a list of upcoming reminders. This will work by sending a text with the message showme
; it will send us a list of pending reminders based on phone number.
We're going to build on the first listener.php
file by changing the code inside the //actions
and //end
actions blocks.
Getting ready
The complete source code for this recipe can be found in the Chapter7/Recipe3
folder.
How to do it…
This recipe will extend listener.php
to allow us to also return a list of upcoming 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 database.Upload
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...