- 调用方法
<?php
require_once('YibaiSdk.php');
$client = new YibaiClient('https://xxxxxx/api', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
try {
$response = $client->smsBatchSubmit(array(
new SmsSubmit('186xxxxxxxx', '【亿佰云通讯】您的验证码是:111111'),
new SmsSubmit('187xxxxxxxx', '【亿佰云通讯】您的验证码是:222222')
));
print_r($response);
} catch (YibaiApiException $e) {
print_r('YibaiApiException, code: ' . $e->getCode() . ', message: '. $e->getMessage());
} catch (Exception $e) {
print_r('Exception. message: ' . $e->getMessage());
}
- 请使用php5.6或更高版本
- PhpSmsApiSample.php为非sdk调用示例,仅供测试,实际使用推荐sdk调用
- 详细api文档请参考https://www.100sms.cn/helpSupports