PHP code example of hosannahighertech / beem-sms-api

1. Go to this page and download the library: Download hosannahighertech/beem-sms-api 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/ */

    

hosannahighertech / beem-sms-api example snippets


$sms = new Client('YOUR_KEY_HERE', 'YOUR_SECRET_HERE');

$message = new Message('SENDER_ID_OR_MOBILE_NO', 'This is my SMS text body');

$message->addRecipient('255xxxxxx', 'RECIPIENT_ID', 'COUNTRY_CODE);

$isSent = $sms->send($message);
if (!$isSent) {
    var_dump($sms->getLastError());// do something useful with error
}