Skip to content

phpmob/thai-bulk-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thai-bulk-sms

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

Releases

No releases published

Packages

No packages published

Languages