Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Twilio API client written in PHP utilizing Zend Framework's Zend_Rest
PHP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
library
README.md

README.md

Twilio Service Project status

Twilio API client written in PHP utilizing Zend Framework's Zend_Rest

About

This is a simple to use Twilio client written in PHP using the Zend_Rest_Client class from the Zend Framework.

This project also includes a fully featured class for generating TwiML (Twilio's XML response markup).

TwiML Examples

Here is an example TwiML snippet from the Twilio docs:

<?xml version="1.0" encoding="UTF-8"?>  
<Response>  
    <Gather action="/process_gather.php" method="GET">  
        <Say>  
            Please enter your account number,   
            followed by the pound sign  
        </Say>  
    </Gather>  
    <Say>We didn't receive any input. Goodbye!</Say>  
</Response>

To do this with the TwiML component of this library, try the following:

$twiml = new Twilio_TwiML();
$twiml->addVerb(
    $twiml->gather(null, array('action' => '/process_gather.php', 'method' => 'GET'))
          ->addVerb($twiml->say('Please enter your account number, followed by the pound sign.'))
);
$twiml->addVerb($twiml->say('We didn\'t receive any input. Goodbye!'));
echo $twiml->render();

Or...

$twiml = Twilio::getTwiMLInstance()
$twiml->addVerb(
    $twiml->gather(null, array('action' => '/process_gather.php', 'method' => 'GET'))
          ->addVerb($twiml->say('Please enter your account number, followed by the pound sign.'))
);
$twiml->addVerb('Say', 'We didn\'t receive any input. Goodbye!'); 
echo $twiml->render();
Something went wrong with that request. Please try again.