I'm currently developing an live messaging app that uses Twilio API for text messaging. Twilio (a cloud based company) they host API's for text messaging. I've developed an application that takes txts from a number and displays it on a screen. However on an Admin side of view; I want to be able to DELETE messages (such as inappropriate messages). That's where i'm stuck at. I want to grab all the text messages from my account SID, list them all on one page and selectively delete messages.
Could someone provide assistance, I really want to learn as I continue development.
Code:
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once('/var/www/html/Twilio.php'); // Loads the library
// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACe5fd6c08b5e1f7c8c9688fee68a269c1";
$token = "****";
$client = new Services_Twilio($sid, $token);
// Loop over the list of messages and echo a property for each one
foreach ($client->account->messages as $message) { print_r($message);
echo $message->body;
}