phpmob / thai-bulk-sms
A PHP SMS gateway for Thai-Bulk-SMS.
dev-master / 1.0.x-dev
2018-07-11 11:23 UTC
Requires
- php: >=7.1
- php-http/client-implementation: ^1.0
- php-http/discovery: ^1.0
- php-http/httplug: ^1.0
- php-http/message: ^1.6
- symfony/options-resolver: ^3.4|^4.1
- symfony/serializer: ^3.4|^4.1
Requires (Dev)
- php-http/guzzle6-adapter: ^1.0
- phpunit/phpunit: ^6.0|^7.0
- symfony/var-dumper: ^3.4|^4.1
This package is auto-updated.
Last update: 2024-12-18 23:49:45 UTC
README
Thai bulk sms api in php.
Installation
This package is not release yet that mean you can't install it by composer require phpmob/thai-bulk-sms
at this time.
For now to install you need to require it directly in your composer.json
:
"require": { "phpmob/thai-bulk-sms": "1.0.x-dev" }
and ..
$ composer update
Usage
// auto detect http-client $client = \Http\Discovery\HttpClientDiscovery::find(); $sender = new \PhpMob\ThaiBulkSms\Sender($client, [ 'username' => 'thaibulksms', 'password' => 'thisispassword', 'force' => 'standard', 'sender' => 'SMS', 'sandbox' => true, ]); // send one number $sender->send('0818282829', 'message'); // send bulk numbers $sender->send(['0818282829', '..number..'], 'message'); // check credit remain $sender->checkCredit(); // All `Sender` APIs are return `PhpMob\ThaiBulkSms\Result` object.
Use GuzzleAdapter
as client.
$ composer req php-http/guzzle6-adapter
and construct sender with guzzle client.
$client = new \Http\Adapter\Guzzle6\Client(...); $sender = new \PhpMob\ThaiBulkSms\Sender($client, [...]);
LICENSE
MIT