PHP code example of hyancat / aliyun-sms-php
1. Go to this page and download the library: Download hyancat/aliyun-sms-php 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/ */
hyancat / aliyun-sms-php example snippets
$sms = new SmsService('[TEST_APP_ID]', '[TEST_APP_KEY]');
$sms->send('[PHONE_NUMBER]', function ($message) {
$message->template('[TEMPLATE_NAME]')->with([
'code' => '我是验证码',
'product' => '我是产品',
])->signName('我是签名');
});