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

ActiveYii2-extension

ladamalina/yii2-smsc
====================

Smsc.ru wrapper for Yii 2

1014.1k↓45.3%8[1 PRs](https://github.com/ladamalina/yii2-smsc/pulls)PHP

Since Apr 9Pushed 5y ago2 watchersCompare

[ Source](https://github.com/ladamalina/yii2-smsc)[ Packagist](https://packagist.org/packages/ladamalina/yii2-smsc)[ RSS](/packages/ladamalina-yii2-smsc/feed)WikiDiscussions master Synced 1mo ago

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 ladamalina/yii2-smsc "*"

```

or add

```
"ladamalina/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'    => 'ladamalina\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

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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/ec51292b55cf24ed12f90da9a7d26acd084af994544a6ffe4d436601931f3315?d=identicon)[ladamalina](/maintainers/ladamalina)

---

Top Contributors

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

### Embed Badge

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

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

PHPackages © 2026

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