PHP code example of fazland / skebby-rest-client
1. Go to this page and download the library: Download fazland/skebby-rest-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/ */
fazland / skebby-rest-client example snippets
$this->skebbyRestClient = new Client([
'username' => 'your_username',
'password' => 'your_password',
'sender' => '+393333333333',
'method' => SendMethods::CLASSIC,
'encoding_scheme' => EncodingSchemas::NORMAL, // Optional
'charset' => Charsets::UTF8, // Optional
'endpoint_uri' => 'https://gateway.skebby.it/api/send/smseasy/advanced/rest.php' // (default)
]);
Sms::create()
->setRecipients([
'+393473322444',
'+393910000000'
])
->setRecipientVariables('+393473322444', [
'name' => 'Mario',
'quest' => 'Go and rescue Peach, Bowser kidnapped her!'
])
->setRecipientVariables('+393910000000', [
'name' => 'Luigi',
'quest' => 'Help Mario, Bowser is really bad!!'
])
->setText('Hey ${name}! ${quest}')
;
$client->send($sms);
$dispatcher = new EventDispatcher(); // any dispatcher implementing EventDispatcherInterface
$options = [/* .. */]; // see above for detailed options
$this->skebbyRestClient = new Client($options, null, $dispatcher);