Cette librairie est mise à la disposition des développeurs qui désirent interagir avec l'api de la plateforme d'envoi de sms marketing en ligne : www.smsplateform.com .

v1.0.0 2020-10-13 11:04 UTC

This package is auto-updated.

Last update: 2024-10-13 19:50:12 UTC


README

"smsplateform.com Composer Library"

Include composer autoload class before.

require_once 'vendor/autoload.php';

Send new sms

use Smsplateform\Client\Auth;
use Smsplateform\Client\Request;

Auth::Init('<YOUR_USERNAME>', '<YOUR_PASSWORD>');
$sms = new Request([
	"sender" 		=> '<SENDER>',
	"msisdn" 		=> '<PHONE>',
	"message" 		=> '<MESSAGE>',

	'webhook_url' 	=> 'https://your-site/script.php'
]);

$result = $sms->Send();
$data = $result->getResponse();

var_dump($data);

Retrieve the list of sms sent

use Smsplateform\Client\Auth;
use Smsplateform\Client\Request;

Auth::Init('<YOUR_USERNAME>', '<YOUR_PASSWORD>');
$sms = new Request([]);

$result = $sms->List();
$data = $result->getResponse();

var_dump($data);

User Profile informations

use Smsplateform\Client\Auth;
use Smsplateform\Client\Request;

Auth::Init('<YOUR_USERNAME>', '<YOUR_PASSWORD>');
$sms = new Request([]);

$result = $sms->Profile();
$data = $result->getResponse();

var_dump($data);

Retrieve information about a given message id

use Smsplateform\Client\Auth;
use Smsplateform\Client\Request;

Auth::Init('<YOUR_USERNAME>', '<YOUR_PASSWORD>');
$sms = new Request([
	"message_id" 	=> '<SMS_ID>'
]);

$result = $sms->View();
$data = $result->getResponse();

var_dump($data);