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
  • By Marcus Battle
    How to Send Bulk Emails in PHP using Twilio SendGrid How to send bulk emails in PHP using Twilio SendGrid

    Frequent and relevant communication with attendees is necessary when planning an event. There are too many opportunities for confusion if timely and detailed messages are not sent. Even when everything goes according to plan guests still need reminders as the event date draws closer.

    Bulk emails are a great method to keep everyone in the loop.

    In this tutorial, we will learn how to send bulk emails to an email list in PHP using Twilio SendGrid.

    We’ll use a foreach() loop to parse through an array of email addresses and build a single array of recipients using SendGrid’s personalization class. SendGrid allows us to personalize each email that every recipient receives. We can even modify content based on the individual email address.

    Tools Needed to Complete This Tutorial

    To complete this tutorial you’ll need the following dependencies installed:

    Get Started with …

    Read More
  • By Marcus Battle
    Send Transactional Emails in PHP with Twilio SendGrid Transactional Emails in PHP with Twilio SendGrid

    Your inbox is undoubtedly full of transactional emails. While they prevent you from getting to inbox zero, without them, you’d have a less informative Internet experience.

    Transactional emails are those sent from within an application when a certain event is triggered. In the case of an e-commerce store, you would send a transactional email when the user has completed their account signup and when they successfully complete their purchase.

    Historically, sending an email in PHP has been one of the simplest tasks to complete. With only the mail() function, you need only to insert a call to the mail() function within any part of your workflow to send a transactional email.

    It’s simplicity, though, has also been its downfall. If you are unfamiliar with the mail() function, know that PHP developers have a love-hate relationship with it because, while it’s easy to implement, it has its challenges with bulk …

    Read More
  • By Marcus Battle
    How to Create a WebSocket Server in PHP with Ratchet for Real-Time Applications Build a PHP WebSocket Server

    When WebSockets are discussed, PHP is rarely included in the conversation due to its lack of native support. Additionally, Apache, the HTTP server PHP normally runs on, is not built with persistent connections in mind which forces the responsibility of implementation onto 3rd party libraries.

    While there have been great attempts to bring PHP into the discussion of “real-time” development, most have paled in comparison to the Ratchet project; a PHP WebSocket library for serving real-time bi-directional messages between clients and server.

    In this tutorial, we will be using Ratchet with PHP to learn how to create a simple WebSocket server that processes messages sent from an HTML form in real time. Our form will display a single <input> and <button> to send a message to all client browsers. Every time the user sends a message their message will be displayed in real time on the other screens.

    This …

    Read More
  • By Marcus Battle
    Build a Wake Word Detection Assistant in PHP using Ratchet for WebSockets and Twilio SMS Wake word detection in PHP using WebSockets

    Due to their data transmission speed and low latency, WebSockets open up exciting possibilities for real-time apps. Many of your favorite apps such as Google Docs, Instagram, and Facebook are already using them to keep us in sync with each other using live data.

    We’re going to dive deeper into the world of PHP WebSocket development by building a wake word and hot word detection assistant that communicates with us via SMS, similar to an Alexa.

    To begin, we’ll use the introductory tutorial, “How to Create a WebSocket Server in PHP to Build a Real-Time Application”. We’ll modify the HTML to create a <textarea> that streams the input value to our WebSocket. Our Socket() class will listen for a list of predefined keywords and upon a match, send an SMS to the user.

    If you haven’t already done so, download the repo here.

    Tools Needed to Complete …

    Read More
  • By Marcus Battle
    Broadcast a Voicemail to Multiple Numbers in Laravel PHP with Twilio Voice Broadcast a Voicemail to Multiple Numbers in Laravel PHP with Twilio Voice.png

    My son just started kindergarten and his first year of not being homeschooled. To say that everyone was nervous was an understatement. Luckily, his school is filled with caring people who aren’t afraid to embrace technology for efficient communication (and calming nervous parents).

    There we were, running errands after his drop-off and our phone was alerted with an email including a photo and message of his progress. The personal touch of being able to see him relaxed calmed our anxiety, allowing us to enjoy the remainder of our afternoon.

    No matter how much we advance technology, it’s my opinion that we must find ways to include “human touch” as much as possible, even if it’s automated.

    This got me thinking about how else I would like to be contacted by his school, especially in case of an emergency. Wouldn’t it be cool if, instead of 160 characters, I could receive …

    Read More
  • By Marcus Battle
    Create Your Own Phone Backup Service using PHP, WhatsApp API, DigitalOcean Spaces, and Laravel Create a Phone Backup Service using WhatsApp.png

    Have you ever had a video from a loved one that you wanted to keep forever? Maybe a picture that you wanted to save but didn’t want to add to your phone? Whatever the use case, it’s almost impossible to backup some types of media, like voicemail and contacts, without an app.

    We're going to learn how to create a phone backup service that allows us to manually transfer data via WhatsApp to cloud storage, just by using our phone number.

    We will accomplish this by creating a RESTful API in Laravel, connecting it to Twilio’s WhatsApp API, and adding cloud storage via DigitalOcean Spaces.

    In order to complete this tutorial you will need the following:

    At the time of writing, DigitalOcean does not provide an official PHP API for connecting to its object storage. …

    Read More
  • By Marcus Battle
    Top PHP State Management Tutorials of August 2019 Top PHP State Management Tutorials of August 2019.png

    Do you want a cookie?

    Almost everyone in the world likes cookies. It’s hard not to like cookies when grandmas, commercials, and bright-eyed Girl Scouts make them impossible to avoid. Those addictive, sweet, circles of joy are so ingrained into our everyday lives that even our dogs and kids don’t stand a chance at avoiding these fine treats.

    It would only make sense that something so delicious would eventually permeate non-food categories. In the mid-1990s, cookies continued their conquest and found their way into technology. 

    During early web browser development, a founding engineer of Netscape Communications decided that the protocol that best-implemented state management should be called “cookies”. Lou Montulli believed that fortune cookies best defined these bits of information delivered in small packets.

    For the past 25 years, cookies have taken the lead in managing state within web applications. However, microservices such as Twilio Sync offer an additional option …

    Read More
  • By Marcus Battle
    Create Your Own Phone Backup Service using PHP, Twilio SMS, DigitalOcean Spaces, and Laravel Create a Phone Backup Service using Twilio SMS.png

    Have you ever had a voicemail from a loved one that you wanted to keep forever? Maybe a contact that you wanted to save but didn’t want to add to your phone? Whatever the use case, it’s almost impossible to backup some types of media, like voicemail and contacts, without an app.

    We're going to learn how to create a phone backup service that allows us to manually transfer data via SMS to cloud storage, just by using our phone number.

    We will accomplish this by creating a RESTful API in Laravel, connecting it to Twilio SMS, and adding cloud storage via Digital Ocean Spaces.

    In order to complete this tutorial you will need the following:

    At the time of writing, DigitalOcean does not provide an official PHP API for connecting to its object storage. So we …

    Read More
  • By Marcus Battle
    Top 7 PHP Tutorials with Twilio for July 2019 Top 7 PHP Tutorials with Twilio for July 2019.png

    From building chatbots to RESTful APIs from scratch, this month’s roundup includes several engaging tutorials. We’ve compiled our top seven PHP tutorials to help you build the future of communications this summer while you’re coding in the air conditioner or at your favorite resort.

    Can you keep a secret?

    Game of Thrones has ended and Avengers has already cycled through the box office, but with the fall season premieres quickly approaching, a new opportunity to spoil your friends' favorite shows is just around the corner. In this intriguing tutorial by Dotun Jolaso, you will learn how to build a spoiler app in PHP with Twilio SMS and Laravel. Your Laravel app will employ bulk SMS messaging via Twilio Copilot to tease subscribers with spoilers after the show airs.

    Everyone needs a little REST

    APIs are not only the backbone of Twilio, but they are also arguably the foundation …

    Read More
  • By Marcus Battle
    Top Laravel Tutorials for June 2019 Top Laravel Tutorials for June 2019.png

    What happens when developers from all over the world mix the most starred PHP framework on GitHub with the leading provider of communication APIs? You get the world’s best Laravel and Twilio communication-based apps!

    Since Laracon 2019 (Laravel’s official conference) is right around the corner, we thought it would be a great idea to share our top four Laravel tutorials from our PHP community from the month of May.

    Whether you’re an experienced Laravel developer or just getting your feet wet with Twilio’s PHP SDK feel free to use these awesome, start-to-finish tutorials as the platform to build your next PHP-based communication app.

    Keep Everyone Informed with Text-2-Subscribe

    Growing an organization comes with its challenges, but the greatest of all to overcome is probably misinformation. Regardless of size, every organization can’t afford to keep its members in the dark on news and events. This tutorial by Samuel Ogundipe will …

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