PHP code example of yuxiaobo / yunxinton_sms_sdk
1. Go to this page and download the library: Download yuxiaobo/yunxinton_sms_sdk 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/ */
yuxiaobo / yunxinton_sms_sdk example snippets
$sms = new Sms($_ENV['USERNAME'], $_ENV['PASSWORD']);
list($success, $response) = $sms->send('18311548014', 'ce试试');
if ($success == false) {
// 短信发送失败
}
bash
./vendor/bin/phpunit test/SmsTest.php