PHPackages                             muravinets/yii2-smsc - 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. muravinets/yii2-smsc

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

muravinets/yii2-smsc
====================

Smsc.ru wrapper for Yii 2

03.8kPHP

Since May 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Muravinets/yii2-smsc)[ Packagist](https://packagist.org/packages/muravinets/yii2-smsc)[ RSS](/packages/muravinets-yii2-smsc/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[Smsc.ru](http://smsc.ru) wrapper for Yii 2

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist muravinets/yii2-smsc "*"

```

or add

```
"muravinets/yii2-smsc": "*"

```

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

Usage
-----

[](#usage)

To use sender, you should configure it in the application configuration like the following,

```
'components' => [
	...
	'sms' => [
        'class'    => 'muravinets\smsc\Smsc',
        'login'     => '',  // login
        'password'   => '', // plain password or lowercase password MD5-hash
        'post' => true, // use http POST method
        'https' => true,    // use secure HTTPS connection
        'charset' => 'utf-8',   // charset: windows-1251, koi8-r or utf-8 (default)
        'debug' => false,    // debug mode
    ],
	...
],
```

Examples
--------

[](#examples)

Обычное сообщение

```
list($sms_id, $sms_cnt, $cost, $balance)
    = Yii::$app->sms->send_sms('79999999999', 'Ваш код для получения скидки');
/*
    возвращает массив (, , , ) в случае успешной отправки
    либо массив (, -) в случае ошибки
*/
```

Проверка результата отправки

```
$sms = Yii::$app->sms;
$result = $sms->send_sms('79999999999', 'Ваш код для получения скидки');
if (!$sms->isSuccess($result)) {
    echo $sms->getError($result);
    die();
}
```

Отправка на группу номеров

```
// в первом параметре передаем список телефонов через запятую или точку с запятой
list($sms_id, $sms_cnt, $cost, $balance)
    = Yii::$app->sms->send_sms('79999999999,79999999990', 'Ваш код для получения скидки');
```

Для перевода сообщения в транслит

```
// в третьем параметре передаем 1
list($sms_id, $sms_cnt, $cost, $balance)
    = Yii::$app->sms->send_sms('79999999999', 'Вы сегодня неотразимы', 1);
```

Отправка от имени Ivan с отложенным временем доставки

```
// будет доставлено абоненту 01.01.2012 г. в 00:00
list($sms_id, $sms_cnt, $cost, $balance)
    = Yii::$app->sms->send_sms('79999999999', 'Вы сегодня неотразимы', 0, '0101120000', 0, 0, 'Ivan');
```

Для проверки статуса доставки SMS

```
list($status, $time) = Yii::$app->sms->get_status($sms_id, '79999999999');
// возвращает массив [ , ,  ]
```

Проверка состояния баланса

```
$balance = Yii::$app->sms->get_balance();
// возвращает баланс в виде строки или false в случае ошибки
```

Проверка стоимости sms

```
list($cost, $cnt)
    = Yii::$app->sms->get_sms_cost('79999999999', 'Вы сегодня неотразимы');
// возвращает массив [ ,  ]
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% 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://avatars.githubusercontent.com/u/16753134?v=4)[Muravinets](/maintainers/Muravinets)[@Muravinets](https://github.com/Muravinets)

---

Top Contributors

[![ladamalina](https://avatars.githubusercontent.com/u/2093425?v=4)](https://github.com/ladamalina "ladamalina (7 commits)")[![Muravinets](https://avatars.githubusercontent.com/u/16753134?v=4)](https://github.com/Muravinets "Muravinets (4 commits)")[![nepster-web](https://avatars.githubusercontent.com/u/5681979?v=4)](https://github.com/nepster-web "nepster-web (1 commits)")

### Embed Badge

![Health badge](/badges/muravinets-yii2-smsc/health.svg)

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

###  Alternatives

[internal/destroy

561.3M14](/packages/internal-destroy)

PHPackages © 2026

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