PHP code example of mmkj / yibai
1. Go to this page and download the library: Download mmkj/yibai library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mmkj / yibai example snippets
nt = 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());
}