Build the future of communications.
Start Building for Free

PHP posts

  • By Ijeoma Nelson
    How to Create a High Converting Sales Page Using PHP, Twilio Messaging, Google's App Engine, and Stripe's API How to Create a High Converting Sales Page Using PHP, Twilio Messaging, Google’s App Engine, and Stripe’s API

    Today's fast-paced, digital economy has created a culture where people want to know how to compete in the global market, what skills are emerging, and how best to learn them.

    Consequently, more and more people are choosing educational resources, such as ebooks and video tutorials, to help us fill the knowledge gap necessary to improve our lot in life.

    And why not? Whether it's resume writing, DIY, or personal budgeting, there's a guru ready to take you from novice to ninja — "in just seven days!"

    Forecast to be worth $350 Billion by 2025, the online learning industry has not only taken the world by storm, it has also created new opportunities for everyday people to become digital entrepreneurs.

    With the abundance of e-commerce platforms, website builders, and content management systems readily available, just about anyone can launch a sales page and start selling e-courses or ebooks.

    How does …

    Read More
  • By Joseph Udonsak
    A Beginner's Guide to Test Driven Development With Symfony and Codeception - Part 3 A Beginner's Guide to Test Driven Development With Symfony and Codeception - Part 3

    Welcome back! It’s been an amazing tour of planet TDD (Test Driven Development) so far. In this series, you’ve learned the benefits of TDD, and gotten your hands dirty building a P2P (Peer-to-peer) payment application.

    Using Symfony and Codeception, you’ve worked through the Red-Green-Refactor cycle, gradually implementing new features via Sliming. You've also seen how TDD protects code from regressions.

    In this, the third and final part in the series, you'll implement the last feature of the application using TDD, transaction history. In addition to that, you'll learn about the concept of test coverage and how it impacts application reliability.


    To follow this tutorial, you need the following things:

    Getting started

    If you already have the code from the first part in this series, you can skip this section. However, …

    Read More
  • By Michael Okoh
    Laravel PHPでRESTful APIを構築する方法 Laravel PHPでRESTful APIを構築する方法

    この記事はMichael Okohこちらで公開した記事(英語)を日本語化したものです。

    ソーシャルネットワークから銀行アプリケーションまで、現代社会は多くのAPIで動いています。本稿では、Laravel PHPを使ってRESTful APIと、それを実装するアプリケーションを構築する方法について学びます。



    • PHP 7.1以降
    • Composer
    • MySQL
    • Laravel 5.6以降
    • Postman


    本稿では、学生に関するデータを取り扱うCRUD APIを構築します。CRUDは、Create(作成)、Read(読み取り)、Update(更新)、Delete(削除)を意味します。このAPIには、次のエンドポイントがあります。

    • GET /api/studentsは、すべての学生レコードを返し、GETリクエストを受け入れます。
    • GET /api/students/{id}は、学生レコードのidを参照して学生レコードを返し、GETリクエストを受け入れます。
    • POST /api/studentsは、新しい学生レコードを作成し、POSTリクエストを受け入れます。
    • PUT /api/students/{id}は、学生レコードのidを参照して既存の学生レコードを更新し、PUTリクエストを受け入れます。
    • DELETE /api/students/{id}は、学生レコードのidを参照して学生レコードを削除し、DELETE …
    Read More
  • By Matthew Setter
    PHPでQRコードを作成する方法 Copy of C02 Blog Text (5).png

    この記事はMatthew Setterこちらで公開した記事(英語)を日本語化したものです。






    • PHPの基礎知識。
    • GD拡張機能がインストールされているPHP 7.4。
    • グローバルにインストールされたComposer
    • スマートフォン。



    mkdir -p php-qr-code-generator \
        php-qr-code-generator/src/QR/{Image,Options} \
    cd php-qr-code-generator

    Microsoft Windowsを使用している場合は、次のコマンドを実行します。

    mkdir php-qr-code-generator
    mkdir php-qr-code-generator/src/QR/Image
    mkd …
    Read More
  • By Matthew Setter
    Crear un Chatbot de WhatsApp con PHP, Mezzio y Twilio chatbot-php

    Un Chatbot es una aplicación de software con la que una persona puede tener una conversación, ya sea por escrito o por voz. Dicho esto, su capacidad de tener una conversación suele variar bastante. Por ejemplo, algunos bots de chat solo pueden responder un conjunto limitado de preguntas específicas (a veces en orden fijo). Sin embargo, otros utilizan una combinación de inteligencia artificial (IA) y aprendizaje automático (ML) para interactuar casi como lo haría un ser humano.

    En este tutorial, le mostraré cómo crear un pequeño y sencillo Chatbot con la API de Twilio para WhatsApp, el marco de Mezzio para PHP y la API del clima con el fin de obtener el pronóstico meteorológico actual para cualquier ciudad del mundo.

    ¿Cómo funcionará el Chatbot?

    Antes de entrar y escribir el código, veamos rápidamente una descripción general de cómo funcionará el Chatbot. En esencia, la lógica del proyecto es …

    Read More
  • By Matthew Setter
    How to Manage Application Secrets With PHP Using Vault How to Manage Application Secrets With PHP Using Vault

    For far too many years, PHP developers stored application credentials and secrets, such as usernames, passwords, and API keys, alongside their code.

    While extremely convenient, this practice was a security nightmare just waiting to happen; if someone could access an application’s source code, they had access to all of its sensitive data too.

    Nowadays, this practice is nowhere near as common as it once was. Rather, it's now incredibly common to store credentials separately from code in dotenv files (.env) which makes them available as environment variables.

    However, while this is a significant improvement, this practice still isn't the best way to keep credentials and secrets secure. For example, if the .env file is accidentally committed to version control, then the credentials and secrets are once again stored alongside code.

    Alternatively, if a malicious actor can access the environment where an application is running from, they can access …

    Read More
  • By Matthew Setter
    Send Scheduled SMS with PHP and Twilio Programmable Messaging Send Scheduled SMS with PHP and Twilio Programmable Messaging

    Twilio Programmable Messaging lets you send SMS, MMS, and WhatsApp messages. However, up until recently, it didn't support scheduling messages for a future date and time. If you wanted to do that, you had to roll that functionality yourself, likely using a Cron job, or some scheduling tool, to retrieve stored messages from a database, and create them when they needed to be sent.

    Now, though, you can schedule SMS messages with a single API call using Message Scheduling!

    In this tutorial, you’ll learn how to schedule SMS ahead of time using PHP. To make the tutorial a little more meaningful, assume that you are writing the code to help remind people about upcoming meetings of the local club that you're a member of.

    Tutorial Requirements

    You will need these items to follow along with this tutorial:

    • PHP 7.4 (ideally 8.1)
    • Composer installed globally
    • A free or paid Twilio …
    Read More
  • By Matthew Setter
    How to Create a Markdown Blog in PHP With the Slim Framework How to Create a Markdown Blog in PHP With the Slim Framework

    When it comes to blogging software, you're not starved for choice. However, despite this choice and how feature-rich modern blogging software is, are the available options necessarily the right choice?

    Sure, software such as WordPress, Ghost, Gatsby, and Wix are very feature-rich — and their UIs are often very smooth. But do you want the hassle of installing, configuring, and securing them on top of writing your blog content? What's more, can you justify the budget that some blogging software requires?

    Maybe, all you want to do is to write your site's content using your preferred editor, using a simple format designed for writing for the web, Markdown, rather than through a user interface.

    If that’s the case, then in this tutorial, I’m going to show you how to create a blog that draws its content from Markdown files. The blog uses the Slim Framework (version 4), the Standard PHP …

    Read More
  • By Oluyemi Olususi
    Laravelアプリケーションでリポジトリパターンを使う方法 Laravelアプリケーションでリポジトリパターンを使う方法

    この記事はOluyemi Olususiこちらで公開した記事(英語)を日本語化したものです。





    データベース関連のロジックを一箇所で管理することにより、コードの構成を整理したり、重複を避けることにもつながります。このようなメリットは小規模のプロジェクトではすぐに …

    Read More
  • By Oluyemi Olususi
    CodeIgniterとJSON Web Tokenを使用したセキュアなRESTful APIの構築方法 CodeIgniterとJSON Web Tokenを使用したセキュアなRESTful APIの構築方法

    この記事はOluyemi Olususiこちらで公開した記事(英語)を日本語化したものです。

    クラウドサービスの利用と応用が拡大する中で、Simple Object Access Protocol(SOAP)よりも効率的なアーキテクチャスタイルの必要性が増しています。REST(REpresentational State Transfer)はクライアントとApplication Programming Interface(API)との軽量でステートレスな通信を可能にします。RESTを使った通信はステートレスです。Restful APIのアクセスコントロールはトークンベースで行われ、クライアントが要求したアクションをリソースに実行する権限があるかどうかを判別する情報が伝えられます。

    本稿では、CodeIgniterを使用したRESTful APIの作成方法を紹介します。CodeIgniterは強力な機能を持つPHPフレームワークで、非常に小さなリソースでフルスケールのWebアプリケーションを構築できます。




    • Composer
    • ローカルデータベースインスタンス
      このチュートリアルではMy …
    Read More
  • Newer
    Sign up and start building
    Not ready yet? Talk to an expert.