All Projects → twilio → starter-php

twilio / starter-php

Licence: MIT license
A starter app for PHP developers embarking on their first Twilio quest!

Programming Languages

PHP
23972 projects - #3 most used programming language
CSS
56736 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Welcome to the PHP Guild!

As members of the PHP guild, you will be completing the challenges of TwilioQuest using PHP, the language that powers the web. This project is pre-configured with some useful Twilio functionality using the Twilio helper library for PHP.

Setting Up

We will be using the Lumen Framework by Laravel for this tutorial and composer to manage its dependencies . Check the requirements to have your system ready to run the project.

Once your system setup is ready, clone this repo and cd into it..

Copy the sample configuration file and edit it to match your configuration.

cp .env.example .env

These environment variable need to be replaced with the following information from your Twilio account:

  • TWILIO_ACCOUNT_SID : Your Twilio "account SID" - it's like your username for the Twilio API. This and the auth token (below) can be found on the console.
  • TWILIO_AUTH_TOKEN : Your Twilio "auth token" - it's your password for the Twilio API. This and the account SID (above) can be found on the console.
  • TWILIO_PHONE_NUMBER : A Twilio number that you own, that can be used for making calls and sending messages. You can find a list of phone numbers you control (and buy another one, if necessary) in the console.

Running the Application

Now that our project is ready, we need to install its dependencies using composer

composer install

Start the application:

php -S 127.0.0.1:4567 -t public

Now you can visit http://localhost:4567/

Try out the voice and messaging demos by entering your mobile phone number and pressing the button. If you receive a voice call and a text message from your Twilio number, you're all set!

Begin Questing!

This is but your first step into a larger world. Return to TwilioQuest to continue your adventure. Huzzah!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].