PHPackages                             hzdad/wbsms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hzdad/wbsms

ActiveLibrary

hzdad/wbsms
===========

Webman plugin hzdad/wbsms

v1.0(4y ago)61.3k1[1 issues](https://github.com/hzdad/wbsms/issues)[1 PRs](https://github.com/hzdad/wbsms/pulls)1MITPHP

Since Jun 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hzdad/wbsms)[ Packagist](https://packagist.org/packages/hzdad/wbsms)[ RSS](/packages/hzdad-wbsms/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (1)

wbsms
=====

[](#wbsms)

webman短信插件

适用于webman, 支持阿里云/腾讯云/七牛云/华为云短信, 基于 [singka-sms](https://github.com/SingKa-TECH/singka-sms) 修改

主要特性
----

[](#主要特性)

- 本插件初始不安装短信发送插件,可根据需要选择安装对应云短信插件

安装
--

[](#安装)

```
composer require hzdad/wbsms

```

阿里云短信安装
-------

[](#阿里云短信安装)

```
composer require alibabacloud/client

```

七牛云短信安装
-------

[](#七牛云短信安装)

```
composer require qiniu/php-sdk

```

华为云短信需要安装guzzlehttp
-------------------

[](#华为云短信需要安装guzzlehttp)

```
composer require guzzlehttp/guzzle

```

腾讯云短信
-----

[](#腾讯云短信)

```
composer require qcloudsms/qcloudsms_php

```

腾讯云插件在php8.0时有一个bug,修复方法如下:

/vendor/qcloudsms/qcloudsms\_php/src/SmsSingleSender.php:82

原代码:

```
public function sendWithParam($nationCode, $phoneNumber, $templId = 0, $params,
    $sign = "", $extend = "", $ext = "")

```

修改后:

```
public function sendWithParam($nationCode, $phoneNumber, $templId = 0, $params='',
    $sign = "", $extend = "", $ext = "")

```

配置
--

[](#配置)

```
config/plugin/hzdad/wbsms/app.php

```

使用示例
----

[](#使用示例)

```
    public function sendsms(){

        $action = 'register';//模板名称
        $mobile = '13588888888';//手机号
        $params = ['code' => '99999'];//参数
        $areacode = "86";//国际区号,腾讯云选传,其他不传
        $sms = new \Hzdad\Wbsms\Wbsms('qiniu');//传入短信服务商名称, 腾讯云 qcloud , 阿里云 aliyun, 七牛 qiniu, 华为 huawei
        $result = $sms->sendsms($action,$mobile,$params,$areacode);

        if ($result['code'] == 200) {
            echo '发送成功';
        } else {
            echo $result['msg'];
        }
    }

```

短信验证码创建并验证插件
------------

[](#短信验证码创建并验证插件)

请参考

或

各大云商短信价格比较,仅供参考,价格可能随时变动(2022年06月05日19:54:31)
---------------------------------------------

[](#各大云商短信价格比较仅供参考价格可能随时变动2022年06月05日195431)

云商1000条5万条20万条是否支持国际短信阿里云5021507980支持腾讯云5023508400支持七牛(618活动价)23.65(原价43)1501.56(原价2085.2)6127.5(原价8170)支持华为(618活动价)651800(原价3150)7000(原价12000)支持阿里云 [https://common-buy.aliyun.com/?spm=5176.8195934.J\_5834642020.3.75eb437807Tgj1&amp;&amp;commodityCode=newdysmsbag#/buy](https://common-buy.aliyun.com/?spm=5176.8195934.J_5834642020.3.75eb437807Tgj1&&commodityCode=newdysmsbag#/buy)

腾讯云

华为

七牛 [https://qmall.qiniu.com/template/MjI?spec\_combo=MTA0OA&amp;smsprice-txt=](https://qmall.qiniu.com/template/MjI?spec_combo=MTA0OA&smsprice-txt=)

如何选购短信(个人建议,仅供参考)
-----------------

[](#如何选购短信个人建议仅供参考)

- 尽量不要购买小厂的短信, 到达率没保证, 而且价格偏高
- 购买套餐包,套餐包比按量付费更优惠
- 购买前在云商首页查看是否有优惠活动
- 不考虑价格的情况下, 阿里云腾讯云无疑是最省心的
- 七牛性价比较高
- 不怕麻烦的情况下,也可以多个云商通道混搭使用

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1480d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eed2b1e6204fb588e5ac7ea299dd38ab2d6dfc65550d3865ae049d4c8422f673?d=identicon)[hzdad](/maintainers/hzdad)

---

Top Contributors

[![hzdad](https://avatars.githubusercontent.com/u/1798052?v=4)](https://github.com/hzdad "hzdad (10 commits)")

### Embed Badge

![Health badge](/badges/hzdad-wbsms/health.svg)

```
[![Health](https://phpackages.com/badges/hzdad-wbsms/health.svg)](https://phpackages.com/packages/hzdad-wbsms)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
