https://github.com/sinri/mwsms-client
梦网平台短信接口
https://github.com/sinri/mwsms-client
Last synced: 8 months ago
JSON representation
梦网平台短信接口
- Host: GitHub
- URL: https://github.com/sinri/mwsms-client
- Owner: sinri
- License: mit
- Created: 2017-03-29T03:53:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-29T08:43:09.000Z (about 9 years ago)
- Last Synced: 2024-03-14T20:21:41.997Z (about 2 years ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mwsms-client
梦网平台短信接口,对应文档3.4,采用HTTP POST方式实现。
## Usage
```PHP
// 由autoload控制,也可以自行引用
require_once 'MWSMSClient.php';
// 建立client
$params=[
"api"=>'http://test.com:9006/MWGate/wmgw.asmx',
"user"=>'U',
"password"=>'P',
];
$client = new \sinri\mwsmsclient\MWSMSClient($params);
//群发短信
$result=$client->doMongateSendSubmit(['13000000000','18000000000'],"同事您好,感谢您对此次测试的配合。123456");
var_export($result);
/*
array (
'done' => true, //是不是有错
'request_id' => '1490775230135809251990',//发送方 MsgId
'data' => '4521856470400363903',//成功,接收方 SmsId 或者失败,错误信息
)
*/
//查还有几条能发
$result=$client->doMongateQueryBalance();
var_export($result);
//查询上行
$result=$client->doMongateGetDeliverForSubmit();
var_export($result);
//查询发送状况
$result=$client->doMongateGetDeliverForDeliver();
var_export($result);
```
虚无……