Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nattaponra/smsmkt_api
Sdk for easy connect mkt sms service with PHP language.
https://github.com/nattaponra/smsmkt_api
php sms-api
Last synced: 25 days ago
JSON representation
Sdk for easy connect mkt sms service with PHP language.
- Host: GitHub
- URL: https://github.com/nattaponra/smsmkt_api
- Owner: nattaponra
- Created: 2017-09-27T09:16:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-02T09:55:04.000Z (about 5 years ago)
- Last Synced: 2024-11-30T13:18:43.431Z (about 2 months ago)
- Topics: php, sms-api
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# smsmkt_api
Sdk for easy connect mkt sms service with PHP language.
# How to use it?
## 1.Connection
```php
$username = "your username";
$password = "your password";
$SmsMkt = new SmsMkt($username, $password, true);
```
result
```php
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
```php
$credit = $SmsMkt->checkCredit();
print_r($credit);
```## 3.Send SMS
Create sms parameters properties
```php
$parameters = new sendSMSParameters();
$parameters->setSender("SENDER_NAME");
$parameters->setPhoneNumberList(array("08xxxxxxx1","08xxxxxxx2"));
$parameters->setMessage("HELLO 3DS");
```
Call sendSms method
```php
$result = $SmsMkt->sendSms($parameters);
print_r($result);
```
result
```php
Array
(
[http_code] => 200
[result_message] => Status=0,Detail=xxxxxx/xxxx.)
```