PHP code example of elmage / textng-php

1. Go to this page and download the library: Download elmage/textng-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

elmage / textng-php example snippets


use Elmage\TextNg\Configuration;
use Elmage\TextNg\Client;

$configuration = new Configuration($apiKey, $senderName);
$client = Client::create($configuration);

$response = $client->getBalance();

$response = $client->sendSMS($route, $phoneNumbers, $message, $bypassCode, $optionalParamsArray);

// This method accepts only one phone number 
// and calls $client->sendSMS(..., [$phoneNumber], ...)
// passing the supplied phone number as the single element in an array

$response = $client->sendOTP($route, $phoneNumber, $message, $bypassCode, $optionalParamsArray);

$response = $client->getDeliveryReport($reference, $req, $used_route);

$response = $client->createCustomer($customerName, $customerPhone, $categoryID);

$response = $client->removeCustomer($customerPhone, $categoryID);
 bash
$ composer