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

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

aweitian/sms
============

短信接口

v1.1.2(4y ago)056MITPHPPHP &gt;=5.3.0

Since Jun 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/aweitian/sms)[ Packagist](https://packagist.org/packages/aweitian/sms)[ Docs](https://github.com/aweitian/sms)[ RSS](/packages/aweitian-sms/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

sms
===

[](#sms)

install
-------

[](#install)

composer require aweitian/sms

单条测试
----

[](#单条测试)

```
$test = new \Aw\Sms\Ali\Send('LTA...YtG','UImf5*******aIm');
$test->setPhoneNumber("136........");
$test->setSignName("田AW");
$test->setTemplateCode("SMS_125015333");
$test->setTemplateParam(array (
  "code" => "102530",
));
$this->assertTrue($test->send());

```

批量测试
----

[](#批量测试)

```
$test = new \Aw\Sms\Ali\BatchSend('LTAIj*****tG','UImf5c0Pmw******WfdaIm',__DIR__."/sms.log");
$test->setPhoneNumber(array('136******','1*******29'));
$test->setSignName(array("田AW","田AW"));
$test->setTemplateCode("SMS_125015333");
$test->setTemplateParam(array(
    array(
        "code" => "123",
    ),
    array(
        "code" => "456",
    ),
));
$this->assertTrue($test->send());
var_dump($test->log);

```

### 签名查询

[](#签名查询)

```
$params = array(
    'SignName' => '十***理'
);

$helper = new SignatureHelper();

// 此处可能会抛出异常，注意catch
$content = $helper->request(
    'LTAI*****jnaqE',
    'SuO*********KVFgIxi',
    "dysmsapi.aliyuncs.com",
    array_merge($params, array(
        "RegionId" => "cn-hangzhou",
        "Action" => "QuerySmsSign",
        "Version" => "2017-05-25",
    )),
    true
);
var_dump($content);
```

```
"RequestId"=> "26D5E39A-A9AE-559B-8D65-487A932DB265"
"Message"=> "OK"
"SignStatus"=> 1 0：审核中。
                 1：审核通过。
                 2：审核失败，请在返回参数Reason中查看审核失败原因
"Code"=> "OK"
"CreateDate"=> "2021-10-16 11:12:54"
"Reason"=> "无审批备注"
"SignName"=> "十***理"
```

### 模板查询

[](#模板查询)

```
$params = array(
    'TemplateCode' => 'SMS_226400252'
);

$helper = new SignatureHelper();

// 此处可能会抛出异常，注意catch
$content = $helper->request(
    'LT***naqE',
    'SuOU********VFgIxi',
    "dysmsapi.aliyuncs.com",
    array_merge($params, array(
        "RegionId" => "cn-hangzhou",
        "Action" => "QuerySmsTemplate",
        "Version" => "2017-05-25",
    )),
    true
);
var_dump($content);
```

```
"TemplateCode" => "SMS_226400252"
"Message"=> "OK"
"RequestId"=> "3D88FE8D-9463-5A75-9646-D94C94AEB15A"
"TemplateContent"=> "文件${title}已从平台下发，请你登陆签收"
"TemplateName"=> "文件发送短信通知"
"TemplateType"=> 1 0：验证码。
                   1：短信通知。
                   2：推广短信。
                   3：国际/港澳台消息。

"Code"=> "OK"
"CreateDate"=> "2021-10-16 11:43:00"
"Reason"=> "无审批备注"
"TemplateStatus"=> 1  0：审核中。
                      1：审核通过。
                      2：审核失败，请在返回参数Reason中查看审核失败原因。
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~411 days

Total

4

Last Release

1669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f29043b8f5aebb2d7a34302c1bc1626bd711398bb0c5387cd8630b45057a4c9?d=identicon)[awei.tian](/maintainers/awei.tian)

---

Top Contributors

[![aweitian](https://avatars.githubusercontent.com/u/6269615?v=4)](https://github.com/aweitian "aweitian (8 commits)")

---

Tags

phpsms

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[amirbagh75/smsir-php

Unofficial sms.ir PHP Package

181.2k](/packages/amirbagh75-smsir-php)

PHPackages © 2026

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