PHPackages                             saviorlv/aliyun-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. saviorlv/aliyun-sms

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

saviorlv/aliyun-sms
===================

Aliyun SMS SDK

1.0.0(5y ago)133MITPHPPHP &gt;=7.1.0

Since Jan 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sunmking/aliyun-sms)[ Packagist](https://packagist.org/packages/saviorlv/aliyun-sms)[ Docs](https://github.com/clyde-cn/aliyun-sms)[ RSS](/packages/saviorlv-aliyun-sms/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

aliyun-sms
==========

[](#aliyun-sms)

安装
--

[](#安装)

```
composer require "saviorlv/aliyun-sms"
```

> or添加下列代码在composer.json文件中并执行composer update 操作

```
{
    "require": {
       "saviorlv/aliyun-sms":"dev-master"
    }
}
```

设置方法
----

[](#设置方法)

> 代码中调用（调用短信发送接口示例）

```
    use saviorlv\aliyun\Sms;
    $accessKeyId = '2w2w2';
    $accessKeySecret = '2w2w2w2w2w';
    $obj = new Sms($accessKeyId,$accessKeySecret);

    //单条
    $response = $obj->sendSms(
        "孙坤峰", // 短信签名
        "SMS_76350132", // 短信模板编号
        "136*****5134", // 短信接收者
        Array(  // 短信模板中字段的值
            "code"=>"12345",
            "product"=>"dsd"
        ),
        "123"
    );
    print_r($response);

    //批量

    $response = $obj->sendBatchSms(
                array("孙坤峰","孙坤峰"), // 短信签名
                "SMS_76350132", // 短信模板编号
                array("136*****134","180*****459"), // 短信接收者
                array(array(  // 短信模板中字段的值
                    "code"=>"12345",
                    "product"=>"dsd"
                ),array(  // 短信模板中字段的值
                    "code"=>"123456",
                    "product"=>"dsd"
                )),
                "123"
            );
//批量发送 签名、手机号、模板字段 数组长度必须相等

如上所示 180*******259收到的短信 签名是"孙坤峰" 内容为  123456
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

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

1948d ago

### Community

Maintainers

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

---

Top Contributors

[![sunmking](https://avatars.githubusercontent.com/u/33918985?v=4)](https://github.com/sunmking "sunmking (1 commits)")

---

Tags

sdksmsaliyun

### Embed Badge

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

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

###  Alternatives

[alibabacloud/sdk

Alibaba Cloud SDK for PHP - Easier to Use Alibaba Cloud in your PHP project

5282.1M45](/packages/alibabacloud-sdk)[saviorlv/yii2-dysms

Aliyun SMS SDK for Yii2

1316.5k1](/packages/saviorlv-yii2-dysms)

PHPackages © 2026

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