2017 © Pedro Peláez
 

library yii2-twilio-sdk

A PHP wrapper for Twilio's API

image

hufeng/yii2-twilio-sdk

A PHP wrapper for Twilio's API

  • Thursday, March 23, 2017
  • by hufeng903
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status Packagist Packagist, (*1)

Installation

You can install twilio-php via composer or by downloading the source., (*2)

Via Composer:

twilio-php is available on Packagist as the twilio/sdk package., (*3)

Quickstart

Send an SMS

// Send an SMS using Twilio's REST API and PHP
messages->create(
  '8881231234', // Text this number
  array(
    'from' => '9991231234', // From a valid Twilio number
    'body' => 'Hello from Twilio!'
  )
);

print $message->sid;
```

### Make a Call

```php
calls->create(
  '8881231234', // Call this number
  '9991231234', // From a valid Twilio number
  array(
      'url' => 'https://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient'
  )
);
```

### Generating TwiML

To control phone calls, your application needs to output
[TwiML](https://www.twilio.com/docs/api/twiml/ "Twilio Markup Language"). Use
`Twilio\Twiml` to easily create such responses.

```php
say('Hello');
$response->play('https://api.twilio.com/cowbell.mp3', array("loop" => 5));
print $response;
```

That will output XML that looks like this:

```xml

<Response>
    <Say>Hello</Say>
    <Play loop="5">https://api.twilio.com/cowbell.mp3</Play>
<Response>

Documentation

The documentation for the Twilio API is located here., (*4)

The PHP library documentation can be found here., (*5)

Versions

twilio-php's versioning strategy can be found here., (*6)

Prerequisites

  • PHP >= 5.3
  • The PHP JSON extension

Getting help

If you need help installing or using the library, please contact Twilio Support at help@twilio.com first. Twilio's Support staff are well-versed in all of the Twilio Helper Libraries, and usually reply within 24 hours., (*7)

If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!, (*8)

The Versions

23/03 2017

dev-master

9999999-dev http://github.com/twilio/twilio-php

A PHP wrapper for Twilio's API

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Twilio API Team

api sms twilio