<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wearesho-team / turbosms-message-delivery example snippets
use Wearesho\Delivery\Message;
use Wearesho\Delivery\TurboSms;
$service = TurboSms\Service::instance();
$service->auth();
$service->balance();
$service->send(new Message("Text", "3809700000000"));
$service->batch("Text", "3809700000000", "3809700000001"/** etc */);
use Wearesho\Delivery;
$service = new Delivery\TurboSms\Service(
new Delivery\TurboSms\Config('login', 'password'),
new GuzzleHttp\Client(['cookies' => true])
);
use Wearesho\Delivery;
/** @var Delivery\TurboSms\Service $service */
$service->send(
new Delivery\Message('Message', '+380000000000')
);
use Wearesho\Delivery;
/** @var Delivery\TurboSms\Service $service */
$balance = $service->balance();
$balance->getAmount();
$balance->getCurrency();
$message = (string)$balance; // will output "{amount} Credits"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.