PHP code example of bingher / ali-sms

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

    

bingher / ali-sms example snippets



return [
    'version' => '2017-05-25',
    'host' => 'dysmsapi.aliyuncs.com',
    'scheme' => 'http',
    'region_id' => 'cn-hangzhou',
    'access_key' => '',
    'access_secret' => '',
    'product' => '海迈电子档案平台',
    'actions' => [
        'register' => [
            'sign_name' => '注册验证',
            'template_code' => 'SMS_67105498',
            'template_param' => [
                'code' => '',
                'product' => '',
            ]
        ],
        'login' => [
            'sign_name' => '登录验证',
            'template_code' => 'SMS_67105500',
            'template_param' => [
                'code' => '',
                'product' => '',
            ]
        ],
        'change_password' => [
            'sign_name' => '变更验证',
            'template_code' => 'SMS_67105496',
            'template_param' => [
                'code' => '',
                'product' => '',
            ]
        ],
    ],
];