flc/dysms

阿里短信-适用Laravel、Yii、Thinkphp等任何PHP项目...

v1.0.3 2019-04-05 16:40 UTC

This package is auto-updated.

Last update: 2021-11-09 15:31:04 UTC


README

Latest Stable Version Total Downloads php>=5.4 License 996.icu LICENSE

PS:阿里大于 https://github.com/flc1125/alidayu

安装

composer require flc/dysms

使用

<?php
use Flc\Dysms\Client;
use Flc\Dysms\Request\SendSms;

$config = [
    'accessKeyId'    => 'LTAIbVA2LRQ1tULr',
    'accessKeySecret' => 'ocS48RUuyBPpQHsfoWokCuz8ZQbGxl',
];

$client  = new Client($config);
$sendSms = new SendSms;
$sendSms->setPhoneNumbers('1500000000');
$sendSms->setSignName('叶子坑');
$sendSms->setTemplateCode('SMS_77670013');
$sendSms->setTemplateParam(['code' => rand(100000, 999999)]);
$sendSms->setOutId('demo');

print_r($client->execute($sendSms));

支持

捐赠

如果你觉得本扩展对你有帮助,请捐赠以表支持,谢谢~~

68747470733a2f2f666c632e696f2f7374617469632f696d616765732f7765636861742e6a7067

微信

68747470733a2f2f666c632e696f2f7374617469632f696d616765732f616c697061792e6a7067

支付宝

License

  • MIT
  • Anti 996