aqlx86/isms-php

PHP library for ISMS SMS API

Installs: 755

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/aqlx86/isms-php

1.2 2018-09-30 13:55 UTC

This package is auto-updated.

Last update: 2025-09-29 01:55:44 UTC


README

iSMS PHP Client

Please check isms site for the list of response error codes and description. https://www.isms.com.my/response_result.php

Current features

  • Send SMS
  • Get Remaining balance

Setup

$ composer.phar install

Sending of SMS example usage

require './vendor/autoload.php';

use ISMS\Recipient;
use ISMS\Message;
use ISMS\SMS;

$recipient = new Recipient('9999999');
$message = new Message($recipient, 'message to send');
$sms = new SMS('username', 'password', $message);

try
{
    $sms->send();
}
catch (\Exception $e)
{
    var_dump($e->getMessage(), $e->getCode());
}

Get remaining SMS balance

require './vendor/autoload.php';

use ISMS\Balance;

$balance = new Balance('username', 'password');

try
{
    echo $balance->get();
}
catch (\Exception $e)
{
    var_dump($e->getMessage(), $e->getCode());
}