1. Go to this page and download the library: Download enigma972/orange-api-client 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/ */
enigma972 / orange-api-client example snippets
OrangeApiClient\Service\Sms\Sms;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use OrangeApiClient\Client;
use OrangeApiClient\Service\Sms\Message;
$cache = new FilesystemAdapter();
$client = new Client($cache, 'YOUR-CLIENT-ID', 'YOUR-CLIENT-SECRET');
$sms = new Sms($client);
$message = new Message();
$message
->content('Hello world, via Orange SMS API.')
->from(243899999999)
->as('Enigma972')
->to(243899999999)
;
$response = $sms->doSend($message);
dd($response->toArray());