2017 © Pedro Peláez
 

library thai-bulk-sms

A PHP SMS gateway for Thai-Bulk-SMS.

image

phpmob/thai-bulk-sms

A PHP SMS gateway for Thai-Bulk-SMS.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

thai-bulk-sms

Thai bulk sms api in php., (*1)

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:, (*2)

"require": {
    "phpmob/thai-bulk-sms": "1.0.x-dev"
}

and .., (*3)

$ 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., (*4)

$client = new \Http\Adapter\Guzzle6\Client(...);
$sender = new \PhpMob\ThaiBulkSms\Sender($client, [...]);

LICENSE

MIT, (*5)

The Versions