PHP code example of fredriktid / key-sms-sdk
1. Go to this page and download the library: Download fredriktid/key-sms-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/ */
fredriktid / key-sms-sdk example snippets
use \FTidemann\KeySms;
$auth = new KeySms\Auth('username', 'apiKey');
$message = new KeySms\Sms\Message();
$message->setContent(new KeySms\Sms\Content('Your message'));
$message->addRecipient(new KeySms\Sms\Recipient(55555555));
$message->addRecipient(new KeySms\Sms\Recipient(66666666));
$client= new KeySms\Client($auth);
$client->setMessage($message);
$client->setHttpClient(new \Http\Adapter\Guzzle6\Client()); // optional
$client->sendSms();