<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Client($sid, $token);

// Loop over the list of messages and echo a property for each one
// TODO: Add To, From, DateSent> parameters
foreach ($client->messages->read() as $message) {
    echo $message->body;
}

<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once 'vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

// Loop over the list of messages and echo a property for each one
$params = array('to' => 'to_number', 'from' => 'from_number', 'dateSent' => date('2016-09-06'));
$result = $client->messages->read($params);

foreach ($result as $message) {
    echo $message->body;
}

Add missing params to search
[retrieve-modify-message-history|PHP] Add missing params to search
