PHP code example of hhink / webman-sms

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

    

hhink / webman-sms example snippets


use Overtrue\EasySms\Strategies\OrderStrategy;

return [
    'enable' => true,

    // HTTP 请求的超时时间(秒)
    'timeout' => 5.0,

    // 默认发送配置
    'default' => [
        // 网关调用策略,默认:顺序调用
        'strategy' => OrderStrategy::class,

        // 默认可用的发送网关
        'gateways' => [
            'aliyun',
        ],
    ],
    // 可用的网关配置
    'gateways' => [
        'errorlog' => [
            'file' => '/tmp/easy-sms.log',
        ],
        'aliyun' => [
            'access_key_id' => '*****************',
            'access_key_secret' => '***********************',
            'sign_name' => '签名',
        ],
    ],
];