PHP code example of rapidsmsng / sms-php-sdk

1. Go to this page and download the library: Download rapidsmsng/sms-php-sdk 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/ */

    

rapidsmsng / sms-php-sdk example snippets



use RapidSMS\RapidSMS;


use RapidSMS\RapidSMS;

$apiKey = 'YWRtaW46YWRtaW4ucGFzc3dvcmQ=';

$from = 'RapidSMSNG';

$destination = '08028333008';

$destination = '08028333008,09054036811,09087040398';

$url = 'https://rapidsmsng.com/sms/api';

$sms = 'Test message from RAPID SMS';

$unicode = '1'; //For Unicode message

$scheduleDate = '05/17/2020 10:20 AM'; //Date like this format: m/d/Y h:i A

$smsBody = array(
    'api_key' => $apiKey,
    'to' => $destination,
    'from' => $from,
    'sms' => $sms
);

$smsBody = array(
    'api_key' => $apiKey,
    'to' => $destination,
    'from' => $from,
    'sms' => $sms,
    'unicode' => $unicode,
);

$smsBody = array(
    'api_key' => $apiKey,
    'to' => $destination,
    'from' => $from,
    'sms' => $sms,
    'schedule' => $scheduleDate,
);

$client = new RapidSMS\RapidSMS();

$response = $client->sendSms($url, $smsBody);

$getInbox = $client->getInbox($apiKey, $url);

$getBalance = $client->checkBalance($apiKey, $url);

php >=7.2
Rapid SMS - Bulk SMS Application

composer 

git clone https://github.com/rapidsmsng/sms-php-sdk.git