Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free

PHP posts

  • By Oluyemi Olususi
    Create a Secured RESTful API with CodeIgniter and JSON Web Tokens Create a Secured RESTful API with CodeIgniter.png

    The growing use and applications of cloud services necessitates a more efficient architectural style than the Simple Object Access Protocol (SOAP). REST (REpresentational State Transfer) allows for a light-weight, stateless communication between clients and the Application Programming Interface (API). Because the communication is stateless, access control for Restful APIs is based on tokens which carry enough information to determine whether or not the client is authorized to perform the requested action on the resource.

    In this tutorial, I will use CodeIgniter to build a RESTful API. CodeIgniter is a powerful PHP framework with a very small footprint which allows developers to build full-scale web applications.


    A basic understanding of CodeIgniter will be helpful in this tutorial. However, I will provide explanations and links to official documentation throughout the tutorial. If you’re unclear on any concept, you can review the linked material before continuing with the …

    Read More
  • By Oluyemi Olususi
    Build a Single Page Application in PHP with CodeIgniter and React Build a Single Page Application in PHP with CodeIgniter and React

    Having a clear dichotomy between client-side and server-side applications comes with many advantages such as separation of concerns and loose coupling, which allows teams to work independently. However this might be overkill for smaller teams or projects managed by the same person. In such situations, a better approach might be to have relevant code for both the front-end and back-end reside in the same project. In this tutorial, I’ll show you how to build a web application with React and CodeIgniter.

    According to the official documentation, React is a JavaScript library for building user interfaces. My favorite feature of React is that it allows me to structure my web applications by breaking the interface into components and building accordingly. I’ve found this to add reusability and consistency to my applications.

    CodeIgniter, on the other hand, is a lightweight open source PHP framework that allows developers to build web applications …

    Read More
  • By Chimezie Enyinnaya
    Build, Test, and Deploy Your Laravel Application With GitHub Actions Build, Test, and Deploy Your Laravel Application With GitHub Actions

    GitHub Actions help you discover, create, and share actions to perform any job you'd like, such as CI/CD, and combine actions in a completely customized workflow. In this tutorial, I’ll be showing you how to build, test and deploy a Laravel Application using GitHub Actions.


    You will need the following to get started with this

    1. GitHub account
    2. Knowledge of Laravel
    3. Knowledge of GitHub
    4. A live server

    Getting started

    Let’s create a new Laravel application:

    $ laravel new laravel-github-actions

    Next, create a repo on GitHub and push the new application to the repo. You can follow the instructions here.

    I went ahead and created a repository on GitHub containing the application, which can be found at https://github.com/ammezie/laravel-github-actions in case you would like to just clone it instead.

    Setting up GitHub Actions

    Now, let’s set up GitHub Actions for the repository. Click on the Actions tab on the repository navigational …

    Read More
  • By Alex Dunne
    Verifying Twilio API Requests in Symfony 5 Verifying Twilio API requests in Symfony 5

    Web applications are powerful tools of communication for everyday life. However, due to their ubiquity, the average user underestimates what it takes to actually build them. As a result, the human interfacing with the app just expects it to work, always.

    While building an application is easier in 2020 than years prior, its success is often dependent upon the use and  integration of external services to provide additional functionality.

    Companies such as Twilio and Stripe offer these services (called APIs) that enable developers to quickly implement functionality that would otherwise be impractical to build independently. Because APIs tend to focus so much on installation, their “Getting Started” guides often guide the developer past the biggest part of their application outside of testing; security.

    In this tutorial, we’ll do the opposite and take a look at security by verifying Twilio API requests in Symfony. To start, we’ll create a basic Symfony …

    Read More
  • By Ogbonna Vitalis
    Build Chrome Desktop Notifications in PHP with Laravel 8, Pusher, and Twilio SMS Build Chrome Desktop Notifications in PHP with Laravel 8, Pusher, and Twilio SMS

    In modern day web applications, real-time notifications are very common as service providers want to keep users informed and engaged about events happening on their platforms. Notifications are a great way to build incentive for users to come back to the platform.

    In this tutorial, we will be implementing a real-time application with desktop notifications by utilizing your browser’s Notification API, Laravel, Pusher, and notifications via Twilio Programmable Messaging.


    To follow along in this tutorial, here are the essentials to get started:

    Set up a Laravel Application

    This tutorial assumes that you are somewhat familiar with PHP and the Laravel Framework. Hence, we will quickly go through the installation process of Laravel and the procedures needed to create a brand new Laravel 8 Application.

    Create a Laravel Application …

    Read More
  • By Onwuka Gideon
    Build a Custom WordPress Plugin to Send SMS with Twilio Programmable Messaging Build a Custom WordPress Plugin to Send SMS with Twilio Programmable Messaging

    The tension of blogging really begins after publishing. Who read it? How do they feel? There are numerous questions that flood the mind of any author, but more importantly, most authors just want their content read.  

    Sending bulk SMS is a great tool to have in your toolbelt to encourage traffic to your WordPress blog. Imagine being able to send an SMS to every subscriber to your blog.

    Let’s build a WordPress plugin in PHP using Twilio Programmable SMS and send text messages to readers about topics they care about.

    Prepare WordPress for the Plugin

    Plugins let you extend and add functionality to your WordPress site. Since we are adding an entirely new function to WordPress, we have to use a plugin to achieve this.

    If you haven’t already installed WordPress, you can download and install a copy by following the installation instructions here. I have my WordPress installation …

    Read More
  • By Oluyemi Olususi
    Build an Automated SMS Survey with Laravel, PHP, and Twilio Programmable SMS Build an Automated SMS Survey with Laravel, PHP, and Twilio Programmable SMS

    In recent years, SMS has been widely used as one of the cost-effective and seamless means of disseminating information in the form of a survey. This allows survey creators to reach a larger audience and facilitate gathering data more efficiently.

    In this tutorial, we will build an automated customer survey application to receive customer feedback for a fictional company through SMS. In leveraging Twilio Programmable SMS, we will connect a Twilio phone number to a Laravel application to build the business logic that will determine when to begin the survey, the questions to ask, and a persistent layer to save the users’ responses. Each participant will send an SMS response to the Twilio number until the survey is completed.

    Let's begin building an automated survey that can be answered via SMS!


    You will need the following to complete this project:

    Read More
  • By Precious Opusunju
    Retrieve and Send Live Bitcoin Rates Every Day Using CEX.io, Twilio SMS, and PHP Retrieve and Send Live Bitcoin Rates Every Day Using CEX.io, Twilio SMS, and PHP.png


    Ever wondered how platforms like Binance set price watchlists for different Bitcoin price alerts? If so, imagine getting a daily SMS alert whenever the price of Bitcoin changes.

    This tutorial will teach you how to use Twilio Programmable SMS to send out live Bitcoin rates every day using your Laravel app. After we’re finished, you will be able to automatically send an SMS containing the conversion rate of Bitcoin to USD to your phone number, daily.

    Installation Requirements

    We will begin with a new Laravel project. Additionally, the following modules are required for proper functionality. These modules are:

    Having installed Laravel on your machine, proceed to create a new project using the Laravel CLI:

    $ laravel new bitcoin_watcher

    Or using the Composer create-project command:

    $ composer create-project --prefer-dist laravel/laravel bitcoin_watcher

    Next, install Twilio’s PHP SDK to …

    Read More
  • By Oluyemi Olususi
    How to Create a Group Video Chat App with Symfony, PHP, Twilio, and React.js How to Create a Group Video Chat App with Symfony, PHP, Twilio, and React

    If the news and current statistics about remote work are any indicator of the future, it’s obvious that working from home is gradually becoming the new normal for employees all over the world, including numerous tech companies. While effective communication may be defined differently for various companies, one of the most promising ways to improve productivity and keep your team together involves using video conferencing or chat.

    This tutorial will guide you on how to create a video conferencing chat application using Symfony, React.js, and Twilio Programmable Video. The video chat application will allow users to connect and participate in a predefined chat room.


    To participate in this tutorial, you will need the following:

    Read More
  • By Matthew Setter
    How to Send an SMS with Mezzio PHP Framework How to Send an SMS with Mezzio PHP Framework

    Whether we’re voting for our favorite candidate on shows such as X Factor, or receiving two-factor authentication codes to log in to services like MailChimp and GitLab, SMS are virtually ubiquitous in modern life. Not only do they make communication in life and work much easier, it also doesn’t take a lot of code to send them either.

    In this tutorial, you’ll learn how to create a simplistic API that can send an SMS using PHP’s Mezzio framework and Twilio’s PHP SDK.

    Once completed, you will be able to send a POST request to the API’s default endpoint, supplying the phone number to send the message to, and the message to send. If the message was successfully sent, then a JSON response will be returned showing a number of details about the sent SMS. If the SMS was not able to be sent, then an appropriate JSON response will …

    Read More
  • Newer
    Sign up and start building
    Not ready yet? Talk to an expert.