In this tutorial we will see how to send bulk sms using clicktell api its quick and simple tutorial for sending message to any number to any carrier. here i am posting my soruce code you can also watch the video on youtube and my site directly.

First you have to installl clicktell sdk using composer so if you don't have composer you can go through the link and download the composer download composer

Make the composer.json file and put the following code and execute the command in your command window in root directly

    "require": { 
        "arcturial/clickatell": "*"

execute the command :

this command will generate the autoload.php file in your project 

then create the index.php file and put the following to for makeing the sms form to add number and messages with send button


include_once './vendor/autoload.php';

use Clickatell\Rest;
use Clickatell\ClickatellException;

<!DOCTYPE html>
        <meta charset="UTF-8">
        <link href="" rel="stylesheet">
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <div class="container">
            <h2>Send Bulk SMS Using Clicktell</h2>
            if (isset($_POST['message']) && isset($_POST['numbers'])) {
                $clickatell = new \Clickatel\Rest('rrYfLWEWSguoY_atIdEVwQ==');
// Full list of support parameters can be found at

                $nuber_array = explode(',', $_POST['numbers']);

                if (empty($_POST['message']) || empty($_POST['numbers'])) {
                    echo "Please type message and at least one number.";
                <div style="max-height: 150px;overflow-y: auto;width: 100%;">
                    try {
                        $result = $clickatell->sendMessage(['too' => $nuber_array, 'contnt' => $_POST['message']]);

                        foreach ($result as $to) {


                            echo "Message send successfully: ". $to['to']."<br>";

                } catch (ClickatellException $e) {
                    // Any API call error will be thrown and should be handled appropriately.
                    // The API does not return error codes, so it's best to rely on error descriptions.
            <form action="" method="post">
                <div class="float-left comman">
                    <textarea placeholder="Message" id="message" name="message"></textarea>

                <div class="float-rigth comman">
                    <textarea placeholder="Phone Number List" id="numbers" name="numbers"></textarea>

                <div style="clear: both">
                    <input type="submit"  value="send" style="">
        <script src="" type="text/javascript"></script>


Thanks you so much for comming here

Download source code

Are you facing problems in understanding this article? download source code now