PHPackages                             zhaolicheng89/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. [Payment Processing](/categories/payments)
4. /
5. zhaolicheng89/sms

ActiveLibrary[Payment Processing](/categories/payments)

zhaolicheng89/sms
=================

短信模块

v1.0(6y ago)03MITPHPPHP &gt;=5.5.0

Since Oct 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/zhaolicheng89/sms)[ Packagist](https://packagist.org/packages/zhaolicheng89/sms)[ RSS](/packages/zhaolicheng89-sms/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

环境要求
====

[](#环境要求)

最低php5.4,建议在`PHP7`上运行以获取最佳性能。

\#SDK介绍#

- **git地址**：
- **packagist地址**：

**若对您有帮助，可以赞助并支持下作者哦，谢谢！**
--------------------------

[](#若对您有帮助可以赞助并支持下作者哦谢谢)

[![](https://camo.githubusercontent.com/3ca48e7eccf81a5fb85f70a1357e8a21609712c425897e0f712d155ff83c611f/687474703a2f2f7777772e696578696f6e672e636f6d2f7061792e706e67)](https://camo.githubusercontent.com/3ca48e7eccf81a5fb85f70a1357e8a21609712c425897e0f712d155ff83c611f/687474703a2f2f7777772e696578696f6e672e636f6d2f7061792e706e67)

- **开发交流QQ群：945105509****`SDK`版权声明**--
- 此SDK基于`MIT`协议发布，任何人可以用在任何地方，不受约束
- 此SDK部分代码来自互联网，若有异议，可以联系作者进行删除

\#SDK相关介绍

目前支持以下短信sdk:

- 阿里云大云短信([https://www.aliyun.com/product/sms?spm=5176.12825654.eofdhaal5.136.7f1f2c4aI6RKx0&amp;aly\_as=F2qr3iy0](https://www.aliyun.com/product/sms?spm=5176.12825654.eofdhaal5.136.7f1f2c4aI6RKx0&aly_as=F2qr3iy0))
- 助通()
- 个推短信()

\#使用方法

- 1、使用`composer`安装

```
composer require zhaolicheng89/sms

```

```
/*
* 个推短信 http://docs.getui.com/sms/
 */
 function twitter_sms(){
     $config=[
         'appId'=>'',
         'appkey'=>'',
         'secret'=>'',
     ];
    // $params为短信模板中字段的值
     $t=new \sms\TwitterSms($config);
     $params=[
         'code'=>rand (1000,9999),
     ];
     $a=$t->send('13152059301',$params,'20190812');
     var_dump($a);
     return 1;
 }
 /*
 * 阿里云大鱼短信 https://www.aliyun.com/product/sms?spm=5176.12825654.eofdhaal5.136.7f1f2c4aI6RKx0&aly_as=F2qr3iy0
  */
 function alyun_sms()
 {
     $config=[
         'accessKeyId'=>'',
         'AccessKeySecret'=>'',
         'setSignName'=>'',
     ];
     $t=new \sms\AliyunSms($config);
     //$params为短信模板中字段的值
     $params=[
         "name"=>'赵先生',
         "store"=>'清华科技园',
     ];
     //$tt=$t->sendSms('13152059301','SMS_162520217',$params);//验证码
      $tt=$t->send('13152059301',$params,'SMS_164511626');//短信
      print_r($tt);
      return $tt;
 }
 /*
  * 助通短信 http://www.ztinfo.cn/
 */
 function assist_sms(){
     $config=[
         'accessKeyId'=>'',
         'AccessKeySecret'=>'',
     ];
     $sms_code = rand(1000, 9999);
     $params='您的验证码是' . $sms_code . '，请不要把验证码泄露给其他人。如非本人操作可忽略本条信息！【迪尔西科技】';//短信内容
     $sendAPI = new \sms\Assist($config);
     $return = $sendAPI->send('13152059301',$params);
     print_r($return);
     return $return;
 }
```

- 2、引入类调用

```
require_once 'src/TwitterSms.php';
require_once 'src/AliyunSms.php';
require_once 'src/Assist.php';
/*
* 个推短信 http://docs.getui.com/sms/
 */
function twitter_sms(){
    $config=[
        'appId'=>'',
        'appkey'=>'',
        'secret'=>'',
    ];
   // $params为短信模板中字段的值
    $t=new \sms\TwitterSms($config);
    $params=[
        'code'=>rand (1000,9999),
    ];
    $a=$t->send('13152059301',$params,'20190812');
    var_dump($a);
    return 1;
}
/*
* 阿里云大鱼短信 https://www.aliyun.com/product/sms?spm=5176.12825654.eofdhaal5.136.7f1f2c4aI6RKx0&aly_as=F2qr3iy0
 */
function alyun_sms()
{
    $config=[
        'accessKeyId'=>'',
        'AccessKeySecret'=>'',
        'setSignName'=>'',
    ];
    $t=new \sms\AliyunSms($config);
    //$params为短信模板中字段的值
    $params=[
        "name"=>'赵先生',
        "store"=>'清华科技园',
    ];
    //$tt=$t->sendSms('13152059301','SMS_162520217',$params);//验证码
     $tt=$t->send('13152059301',$params,'SMS_164511626');//短信
     print_r($tt);
     return $tt;
}
/*
 * 助通短信 http://www.ztinfo.cn/
*/
function assist_sms(){
    $config=[
        'accessKeyId'=>'',
        'AccessKeySecret'=>'',
    ];
    $sms_code = rand(1000, 9999);
    $params='您的验证码是' . $sms_code . '，请不要把验证码泄露给其他人。如非本人操作可忽略本条信息！【迪尔西科技】';//短信内容
    $sendAPI = new \sms\Assist($config);
    $return = $sendAPI->send('13152059301',$params);
    print_r($return);
    return $return;
}
alyun_sms();
twitter_sms();
assist_sms();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

2401d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3104a79f5c620a75d5ac795c62ae29f68bd02f98dbf99c7a86defc261d34ddbe?d=identicon)[zhaolicheng](/maintainers/zhaolicheng)

---

Tags

payment

### Embed Badge

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

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

###  Alternatives

[paymentsuite/stripe-bundle

Stripe PaymentSuite Component

105.0k](/packages/paymentsuite-stripe-bundle)

PHPackages © 2026

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