PHP code example of walthere / aliyun-sms

1. Go to this page and download the library: Download walthere/aliyun-sms 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/ */

    

walthere / aliyun-sms example snippets


//config/AliyunSms.php
return [
    "accessKeyId" => "你的accessKeyId",
    "accessKeySecret" => "你的accessKeySecret",
    "regionId"=>"你的regionId",
];

 $data = [
            'PhoneNumbers' => '手机号码',
            'SignName' => "签名名称",
            'TemplateCode' => "模板code",
            'TemplateParam' => '模板参数',      
        ];
 $result = AliyunSms::send($data);