PHPackages                             ninenight/dh-sms - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ninenight/dh-sms

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ninenight/dh-sms
================

整合常用短信接口,方便记录/管理/调用

v1.0.4(5y ago)238MITPHPPHP &gt;=7.0

Since Jul 17Pushed 5y agoCompare

[ Source](https://github.com/dhailing/dh-sms)[ Packagist](https://packagist.org/packages/ninenight/dh-sms)[ RSS](/packages/ninenight-dh-sms/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (6)Used By (0)

**ninenight/dh-sms**

`composer require ninenight/dh-sms`

- 集合常用的短信接口,不用每次都复制方法什么的,旨在即装即用

聚知信
---

[](#聚知信)

```
public static function juzhixin($data)
{
    $user_config = [            //申请信息配置
        'juzhixin' => [         //聚知信配置
            'account' => '',    //账号
            'password' => '',   //密码
            'subid' => ,        //用户id
        ]
    ];

    $code = mt_rand(1000, 9999);
    $config_biz = [
        'sendTime' => '',           //配置定时发送时间,不定时,为空
        'mobile' => '182********',  //手机号
        'content' => '【XXX】您的验证码是' . $code . ',请在5分钟内使用。'   //发送内容
    ];

    $sms = new Send($user_config);  //实例化短信发送对象

    $result = $sms->driver('juzhixin')->gateway('action')->send($config_biz);   //发送短信

    dd($result);    //打印发送结果

//    array:5 [
//      "returnstatus" => "Success"
//      "message" => "ok"
//      "remainpoint" => "98481"
//      "taskID" => "116459"
//      "successCounts" => "1"
//    ]
}

```

玄武短信
----

[](#玄武短信)

```
public static function xuanwu()
{
    $user_config = [            //申请信息配置
        'xuanwu' => [           //玄武短信配置
            'account' => '',    //账号
            'password' => '',   //密码
            'subid' => '',      //用户id 可以为空
        ]
    ];

    $code = mt_rand(1000, 9999);
    $config_biz = [
        'mobile' => '182********',
        'content' => '您的验证码是' . $code . ',请在5分钟内使用。'
    ];

    $sms = new Send($user_config);

    $result = $sms->driver('xuanwu')->gateway('action')->send($config_biz);

    dd($result);

    //0 表示发送成功
}

```

阿里云短信
-----

[](#阿里云短信)

```
public static function aliyun()
{
    $user_config = [                    //阿里云申请的配置信息
        'aliyun' => [
            'accessKeyId' => '',
            'accessKeySecret' => '',
            'signName' => '',
        ]
    ];

    $code = mt_rand(1000, 9999);
    $config_biz = [
        'mobile' => '182********',
        'templateParam' => ['code' => $code],   //模板中的变量
        'TemplateCode' => 'SMS_15******'        //阿里云申请的模板号/id
    ];

    $sms = new Send($user_config);

    $result = $sms->driver('aliyun')->gateway('action')->send($config_biz);

    dd($result);

//    array:4 [
//      "Message" => "OK"
//      "RequestId" => "27B11BA9-2A2E-4D64-AC7F-CE8CDB4386A2"
//      "BizId" => "824800563362009295^0"
//      "Code" => "OK"
//    ]
}

```

飞鸽传书
----

[](#飞鸽传书)

```
public static function feige()
{
    $user_config = [                    //飞鸽传书短信的配置信息
        'feige' => [
            'account' => '',
            'password' => '',
            'signId' => '',
        ]
    ];
    $config_biz = [
        'mobile' => '182********',
        'content' => $param1 . '||' . $param2 . '||' . $param3,   //模板中的变量
        'templateId' => '117***'        //申请的模板号/id
    ];

    $sms = new Send($user_config);

    $result = $sms->driver('flyingpigeon')->gateway('action')->send($config_biz);

    dd($result);

}

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Every ~130 days

Total

5

Last Release

1976d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52cd12f9914a96a4b0a61162d8c74b2a8dbd4965611e3bd11845fe9a0f4e9a2b?d=identicon)[Ndhailing](/maintainers/Ndhailing)

---

Top Contributors

[![dhailing](https://avatars.githubusercontent.com/u/19296538?v=4)](https://github.com/dhailing "dhailing (1 commits)")[![Ndhailing](https://avatars.githubusercontent.com/u/22056984?v=4)](https://github.com/Ndhailing "Ndhailing (1 commits)")

### Embed Badge

![Health badge](/badges/ninenight-dh-sms/health.svg)

```
[![Health](https://phpackages.com/badges/ninenight-dh-sms/health.svg)](https://phpackages.com/packages/ninenight-dh-sms)
```

###  Alternatives

[droptica/droopler

Droopler - SEO Friendly CMS &amp; Site Builder - is a Drupal-based website builder that helps you create beautiful, fast, and easy-to-manage websites

6543.1k1](/packages/droptica-droopler)[facebook/facebook-for-magento

Facebook For Magento

852.0k](/packages/facebook-facebook-for-magento)[sinergi/token

PHP library to generate random strings

188.7k9](/packages/sinergi-token)

PHPackages © 2026

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