nattaponra/smsmkt_api

There is no license information available for the latest version (1.1.0) of this package.

Sdk for easy connect mkt sms service with PHP language.

1.1.0 2017-10-02 09:45 UTC

This package is not auto-updated.

Last update: 2024-11-13 04:17:28 UTC


README

Sdk for easy connect mkt sms service with PHP language.

How to use it?

1.Connection

$username = "your username";
$password = "your password";
$SmsMkt = new SmsMkt($username, $password, true);

result

Array
(
    [http_code] => 200
    [result_message] => Status=0,Detail=Your account have xxx SMS@Valid thru 20 September 2561@Within 999 Days

)

2.Check your credit

$credit = $SmsMkt->checkCredit();
print_r($credit);

3.Send SMS

Create sms parameters properties

$parameters = new sendSMSParameters();
$parameters->setSender("SENDER_NAME");
$parameters->setPhoneNumberList(array("08xxxxxxx1","08xxxxxxx2"));
$parameters->setMessage("HELLO 3DS");

Call sendSms method

$result = $SmsMkt->sendSms($parameters);
print_r($result);

result

Array
(
    [http_code] => 200
    [result_message] => Status=0,Detail=xxxxxx/xxxx.

)