1. Go to this page and download the library: Download cecula/messaging-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/ */
cecula / messaging-api example snippets
use Cecula\MessagingApi\Messaging;
piKey' => 'paste-your-api-key-here'
]);
echo $messagingClient->getBalance();
$smsParams = [
'sender' => 'SENDER', // Note: this has to be pre-registered and approved
'recipients' => ['2348XXXXXXXXX'],
'text' => 'Happy for another day',
];
echo $messagingClient->sendSms($smsParams);
use Cecula\MessagingApi\Messaging;
class ClassName
{
public function doSomething()
{
$messagingClient = new Messaging([
'apiKey' => 'paste-your-api-key-here'
]);
echo $messagingClient->getBalance();
$smsParams = [
'sender' => 'SENDER', // Note: this has to be pre-registered and approved
'recipients' => ['2348XXXXXXXXX'],
'text' => 'Happy for another day',
];
echo $messagingClient->sendSms($smsParams);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.