Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Twilio Best Practices
  • Toc
  • feedback
Twilio Best Practices

Twilio Best Practices

By : Rogers
4.5 (4)
close
Twilio Best Practices

Twilio Best Practices

4.5 (4)
By: Rogers

Overview of this book

If you have experience with at least one programming language and are looking to integrate Twilio into your applications, then this book is for you.
Table of Contents (10 chapters)
close
9
Index

PHP – a recap

We've already worked with the PHP library in Chapter 2, Exploring the REST API, but it's worth a quick recap so we can see more clearly how it compares with libraries in the other languages we'll be looking at.

To get a hold of the PHP library, we can manually download its source and include it into our project ourselves. However, it's much better to use Composer, which is a dependency management tool for PHP.

First, you'll need to install Composer for your platform. Follow the instructions at https://getcomposer.org/doc/00-intro.md to get up and running.

Once Composer is set up, simply run this in your project directory:

composer require twilio/sdk dev-master

This will create a composer.json file for you to record your and then will add the Twilio library to this file, download the library and all of its dependencies, and generate an autoload.php file.

Now that the library is installed into our project, we can set up the client as follows:

<...
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete