1. Go to this page and download the library: Download djosend/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/ */
djosend / php-sdk example snippets
josend\DjosendClient;
$client = new DjosendClient($_ENV['DJOSEND_API_KEY']);
$message = $client->sendMessage([
'channel' => 'sms',
'to' => '+2250102030405',
'body' => 'Bonjour depuis Djosend',
], bin2hex(random_bytes(16)));
// L'envoi est asynchrone : consulter ensuite son statut.
$details = $client->getMessage($message['id']);
echo $details['status'];