PHP code example of informagenie / orange-sms
1. Go to this page and download the library: Download informagenie/orange-sms 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/ */
informagenie / orange-sms example snippets
Informagenie\OrangeSDK;
$credentials = [
'client_id' => 'your_client_id',
'client_secret' => 'your_client_secret'
];
$version = 'v3'; //per default
/*
You can use directly authorization header instead of client_id and client_secret
$credentials = [
'authorization_header' => 'Basic xxx...',
];
*/
$sms = new OrangeSDK($credentials);
$response = $sms->message('Hello world !', $version)
->from(243820000000) // Sender phone's number
->as('Informagenie') // Sender's name (optional)
->to(2439000000000) // Recipiant phone's number
->send();