PHP code example of gzdsx / sms-sdk

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

    

gzdsx / sms-sdk example snippets


SmsSdk::registerAliyun('your accessKeyId','accessSecret','默认签名','默认模版');

SmsSdk::registerTencentCloud('your secretId','your secretKey','默认SmsSdkAppId','默认签名','默认模版');

SmsSdk::aliyun()
    ->setPhoneNumbers('13800000000')
    ->setTemplateParam(['code'=>'123456'])
    ->send();

SmsSdk::tencentCloud()
    ->setPhoneNumbers('13800000000')
    ->setTemplateParam(['code'=>'123456'])
    ->send();