Bladephp: Now with 8+ codeigniter, php, and laravel project 8+ php project From $37/Month From Rs. 2499/Month

Twilio Send SMS using PHP

by
Category:php
php
Twilio Send SMS using PHP

In a few lines of code, your PHP application can send, receive, and reply text messages with Twilio Programmable SMS. Download below library file and copy and paste code after setup Account ID, Auth Token and Twilio Number. You may also like How to create text editor in textarea using jquery and Tinymce full featured text editor.

Download Library File

Code

require __DIR__ . '/twilio-php-master/Twilio/autoload.php';
use Twilio\Rest\Client;

$account_sid = '';
$auth_token = '';

$number = '1234567891';
$twilio_number = "+911234567891";
$client = new Client($account_sid, $auth_token);
$client->messages->create(
    '+91'.$number.'',
    array(
        'from' => $twilio_number,
        'body' => 'test message'
    )
);

0 Comments


Html code work in comment box


Related Post