myomyintaung512 / smspoh
A PHP library for interacting with the SMSPoH RESTful SMS API
v1.0.1
2025-02-27 04:05 UTC
Requires
- php: >=7.4
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2025-06-19 05:31:47 UTC
README
This is a PHP library to interact with the SMSPoH V3 API.
Installation
Install using Composer:
composer require myomyintaung512/smspoh
Usage
require 'vendor/autoload.php'; use myomyintaung512\smspoh\SmsPohApi; $apiKey = 'your_api_key'; $apiSecret = 'your_api_secret'; $api = new SmsPohApi($apiKey, $apiSecret); // Send an SMS $response = $api->sendSms('09xxxxxxxxx', 'Hello World', 'YourSenderID', [ 'clientReference' => 'abcde12345', 'test' => true, ]); print_r($response); // Get balance $response = $api->getBalance(); print_r($response); // Get messages $response = $api->getMessages(['limit' => 10]); print_r($response);
Testing
Run tests with PHPUnit:
vendor/bin/phpunit tests
License
This library is licensed under the MIT License.