PHPackages                             dovechen/yii2-ihuyi - 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. dovechen/yii2-ihuyi

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

dovechen/yii2-ihuyi
===================

Yii2 ihuyi sms SDK

v1.0.3(2y ago)11.0kMITPHP

Since Dec 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/DoveChen/yii2-ihuyi)[ Packagist](https://packagist.org/packages/dovechen/yii2-ihuyi)[ RSS](/packages/dovechen-yii2-ihuyi/feed)WikiDiscussions master Synced yesterday

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

Yii2-ihuyi
==========

[](#yii2-ihuyi)

Yii2 ihuyi sms SDK

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist dovechen/yii2-ihuyi "*"

```

or add

```
"dovechen/yii2-ihuyi": "*"

```

to the require section of your `composer.json` file.

Configuration
-------------

[](#configuration)

To use this extension, you have to configure the Connection class in your application configuration:

```
return [
    //....
    'components' => [
        'ihuyi' => [
            'class' => 'dovechen\yii2\ihuyi\Ihuyi',
            // normal sms.
            'sms'  => [
                'appid'  => '',
                'apikey' => '',
            ],
            // international sms.
            'isms'  => [
                'appid'  => '',
                'apikey' => '',
            ],
            // voice sms.
            'vsms'  => [
                'appid'  => '',
                'apikey' => '',
            ],
            // voice notice sms.
            'vnsms'  => [
                'appid'  => '',
                'apikey' => '',
            ],
            // marketing sms.
            'msms'  => [
                'appid'  => '',
                'apikey' => '',
            ],
            // multimedia sms.
            'mms'  => [
                'appid'  => '',
                'apikey' => '',
            ],
        ],
    ]
];
```

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

Normal sms:

```
// Send normal sms.
$sendResult = Yii::$app->ihuyi->sendSms('15395090543', 'Your code is 1123.');

// Get normal sms.
$smsNumInfo = Yii::$app->ihuyi->getSmsNum();

// Add normal sms template.
$smsTemplateInfo = Yii::$app->ihuyi->addSmsTemplate('Your code is【变量】');
```

International sms:

```
// Send international sms.
$sendResult = Yii::$app->ihuyi->sendInternational('+86 15395090543', 'Your code is 1123.');

// Get international sms.
$internationalNumInfo = Yii::$app->ihuyi->getInternationalNum();
```

Voice sms:

```
// Send voice sms.
$sendResult = Yii::$app->ihuyi->sendVoice('15395090543', '1123');

// Get voice sms.
$voiceNumInfo = Yii::$app->ihuyi->getVoiceNum();
```

Voice notice sms:

```
// Send voice notice sms.
$sendResult = Yii::$app->ihuyi->sendVoiceNotice('15395090543', 'Your code is 1123.');

// Get voice notice sms.
$voiceNoticeNumInfo = Yii::$app->ihuyi->getVoiceNoticeNum();
```

Marketing sms:

```
// Send marketing sms.
$sendResult = Yii::$app->ihuyi->sendMarketing('15395090543,15395090544', 'Your code is 1123.');
$sendResult = Yii::$app->ihuyi->sendMarketing(['15395090543', '15395090544'], 'Your code is 1123.');

// Get marketing sms.
$marketingNumInfo = Yii::$app->ihuyi->getMarketingNum();
```

Multimedia sms:

```
// Send multimedia sms.
$sendResult = Yii::$app->ihuyi->sendMms('15395090543', 10048, 1001);
$sendResult = Yii::$app->ihuyi->sendMms('15395090543,15395090544', 10048, 1001);
$sendResult = Yii::$app->ihuyi->sendMms(['15395090543', '15395090544'], 10048, 1001);

// Get multimedia sms.
$multimediaNumInfo = Yii::$app->ihuyi->getMmsNum();

// Create multimedia sms.
$multimediaInfo = Yii::$app->ihuyi->createMms('New mutledia title', $zipFile);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

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 ~454 days

Total

4

Last Release

989d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e4956233268ce8cc017fe9a502eab66720e5940c0cf394ffa1d952684ecff1f?d=identicon)[DoveChen](/maintainers/DoveChen)

---

Top Contributors

[![DoveChen](https://avatars.githubusercontent.com/u/12093494?v=4)](https://github.com/DoveChen "DoveChen (14 commits)")

---

Tags

smsyii2extensionihuyiyii2-ihuyi

### Embed Badge

![Health badge](/badges/dovechen-yii2-ihuyi/health.svg)

```
[![Health](https://phpackages.com/badges/dovechen-yii2-ihuyi/health.svg)](https://phpackages.com/packages/dovechen-yii2-ihuyi)
```

###  Alternatives

[daixianceng/yii2-smser

Yii2 SMS extension

862.9k1](/packages/daixianceng-yii2-smser)[avator/yii2-turbosms

Yii2 turbosms

1030.5k](/packages/avator-yii2-turbosms)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[abhi1693/yii2-sms

Send Free Sms for Yii2

171.9k](/packages/abhi1693-yii2-sms)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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