PHP code example of myomyintaung512 / smspoh

1. Go to this page and download the library: Download myomyintaung512/smspoh library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

myomyintaung512 / smspoh example snippets




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);