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

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

virtual-sms/sms
===============

阿里云简单发送短信

09PHP

Since Oct 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/gandebucuo/virtual-sms)[ Packagist](https://packagist.org/packages/virtual-sms/sms)[ RSS](/packages/virtual-sms-sms/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

前言
==

[](#前言)

###### 由于个人实际开发中使用官方SDK短信，大部分扩展功能都未使用到，因此开发此简约版发送短信功能，方面后续使用；若后续需要其他功能，将继续扩展。

[](#由于个人实际开发中使用官方sdk短信大部分扩展功能都未使用到因此开发此简约版发送短信功能方面后续使用若后续需要其他功能将继续扩展)

说明
==

[](#说明)

###### 由于官方SDK，单独使用发送短信功能，源码需要走很多流程验证判断，影响性能；特此开发简约版本发送短信，使用RPC风格接口，由官方API + 签名组成，因此不存在版本不兼容问题。

[](#由于官方sdk单独使用发送短信功能源码需要走很多流程验证判断影响性能特此开发简约版本发送短信使用rpc风格接口由官方api--签名组成因此不存在版本不兼容问题)

安装
==

[](#安装)

#### 使用composer命令直接安装

[](#使用composer命令直接安装)

```
composer require virtual-sms/sms

```

#### 或在composer.json添加包名后，执行composer install安装

[](#或在composerjson添加包名后执行composer-install安装)

```
{
    "require": {
        "virtual-sms/sms": "dev-main"
    }
}

```

使用方法
====

[](#使用方法)

#### 发送短信

[](#发送短信)

```
use VirtualCloud\SmsInit;
...
    $config   =  [
        'access_key_id'     => 'LTAI5t****EL4i9R6',
        'access_key_secret' => '2Ta711***mYXwF333',
    ];

    $params = [
        "phoneNumbers"  => "152******71",       //手机号
        "signName"      => "ABC商城",           //签名名称
        "templateCode"  => "SMS_203717462",     //模板CODE
        "templateParam" => '{"code":"123456"}', //短信参数，json格式
    ];

    $new    = SmsInit::make(Ali,$config,$params);
    //发送短信
    $result = $new->sendSms();
...

```

#### $config 配置参数说明

[](#config-配置参数说明)

```
//阿里云
$congig = [
    'access_key_id'     => 'LTAI5t****EL4i9R6',
    'access_key_secret' => '2Ta711***mYXwF333',
]

```

联系我们
====

[](#联系我们)

如需丰富扩展/其他业务/建议，请直接向 发送邮箱；或添加微信，请说明来意奥

[![个人微信](https://camo.githubusercontent.com/b296d316ef4c3a14bc61abb850d465936db7d5ef02cc6d1c5584655717f898e0/687474703a2f2f7869616f6e6172756e2e6f73732d636e2d6265696a696e672e616c6979756e63732e636f6d2f77782e6a70673f782d6f73732d70726f636573733d696d6167652f726573697a652c6d5f66697865642c685f3334302c775f333030)](https://camo.githubusercontent.com/b296d316ef4c3a14bc61abb850d465936db7d5ef02cc6d1c5584655717f898e0/687474703a2f2f7869616f6e6172756e2e6f73732d636e2d6265696a696e672e616c6979756e63732e636f6d2f77782e6a70673f782d6f73732d70726f636573733d696d6167652f726573697a652c6d5f66697865642c685f3334302c775f333030)

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/963a3d83665d03a86359f718ae6435e0a0bae11f09719b607457385cf3aa5b28?d=identicon)[gandebucuo](/maintainers/gandebucuo)

---

Top Contributors

[![gandebucuo](https://avatars.githubusercontent.com/u/54588631?v=4)](https://github.com/gandebucuo "gandebucuo (6 commits)")

### Embed Badge

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

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

###  Alternatives

[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[magepal/magento2-reindex

Reindex your Magento2 store quickly and easily from backend/admin, instead of command line.

112649.7k1](/packages/magepal-magento2-reindex)[redberry/mcp-client-laravel

Package that enables you access to any mcp server that you define in the config

1345.0k1](/packages/redberry-mcp-client-laravel)

PHPackages © 2026

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