PHP code example of saralsms / sdk-for-php

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

    

saralsms / sdk-for-php example snippets


// quire 'vendor/autoload.php';

use SaralSMS\Client;

// instantiate a SaralSMS client.
$client = new Client('f9c6......55c1');

$client->send(['9851xxx123', '9801xxx456'], 'This is test message from API.');

$client->getCredits();

$pageNumber = 1;
$client->getReports($pageNumber);

composer