Skip to content

aboven/clicktocall-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twilio

Click to Call PHP

An application example implementing Click to Call using Twilio.

Read the full tutorial here!

Installation

Step-by-step on how to deploy, configure and develop on this example app.

Local Development

  1. Grab latest source

     $ git clone git:https://github.com/TwilioDevEd/clicktocall-php.git
  2. Setup your environment variables

    Are you using a bash shell? Use echo $SHELL to find out. For a bash shell, edit the ~/.bashrc or ~/.bashprofile file and add:

     export TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxx
     export TWILIO_AUTH_TOKEN=yyyyyyyyyyyyyyyyy
     export TWILIO_NUMBER=+15556667777

    Or just export the same variables for this session.

  3. Install the dependencies with Composer.

    $ composer install
  4. Start the server.

    $ php -S localhost:3000 -t ./src
  5. Expose the application to the wider internet

  6. Check out the app at https://<sub-domain>.ngrok.io.

Expose the Application to the Wider Internet

  1. Expose your application to the wider internet using ngrok. You can click here for more details. This step is important because the application won't work as expected if you run it through localhost.
 $ ngrok http 3000

Once ngrok is running, open up your browser and go to your ngrok URL. It will look something like this: https://<sub-domain>.ngrok.io

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.

About

Click to Call with Twilio and Vanilla PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Hack 44.8%
  • PHP 28.3%
  • JavaScript 22.9%
  • Shell 4.0%