PHPackages                             ybelenko/smsgorod-api-client - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. ybelenko/smsgorod-api-client

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

ybelenko/smsgorod-api-client
============================

Library for using SMSGateway service provided by SmsGorod.ru.

v2.0.0(4y ago)113MITPHPPHP ^7.0 || ^8.0CI failing

Since Dec 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ybelenko/smsgorod-api-client)[ Packagist](https://packagist.org/packages/ybelenko/smsgorod-api-client)[ Docs](https://smsgorod.ru)[ RSS](/packages/ybelenko-smsgorod-api-client/feed)WikiDiscussions master Synced 1w ago

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

SMSGorod API Client
===================

[](#smsgorod-api-client)

[![Latest Stable Version](https://camo.githubusercontent.com/2180963560481cde092954d6e72d554f263d1fef0cc1d4cae900462dc413c987/68747470733a2f2f706f7365722e707567782e6f72672f7962656c656e6b6f2f736d73676f726f642d6170692d636c69656e742f762f737461626c65)](https://packagist.org/packages/ybelenko/smsgorod-api-client)[![Build Status](https://github.com/ybelenko/smsgorod-api-client/actions/workflows/ci.yml/badge.svg)](https://github.com/ybelenko/smsgorod-api-client/actions/workflows/ci.yml)[![Coverage Status](https://camo.githubusercontent.com/1cb520e564fa1219c3c75cafde8023c9da3ff8a9eeca1937ac155a9b24af42f2/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7962656c656e6b6f2f736d73676f726f642d6170692d636c69656e742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/ybelenko/smsgorod-api-client?branch=master)[![License](https://camo.githubusercontent.com/9993faa2ee65730461399ef328e6a24bcaed8fbbadac08acf92309719bff1a7a/68747470733a2f2f706f7365722e707567782e6f72672f7962656c656e6b6f2f736d73676f726f642d6170692d636c69656e742f6c6963656e7365)](https://packagist.org/packages/ybelenko/smsgorod-api-client)

Примечание от службы поддержки СМС Город:

> ❗ Перед подключением данной клиентской библиотеки необходимо написать на . На основании ваших пожеланий, служба поддержки поможет выбрать соответствующий канал отправки сообщений.

Требования
----------

[](#требования)

- Любой вебсервер, например Apache
- PHP ^7.0 || ^8.0
- PHP extensions:
    - ext-curl
    - lib-curl
    - lib-libxml
    - ext-SimpleXML
    - ext-json
- Composer
- Shell доступ, чтобы запустить скрипт установки в терминале

Установка
---------

[](#установка)

Для установки потребуется [Composer](https://getcomposer.org/download/). После успешной установки Composer нужно запустить распаковку пакетов через терминал/консоль:

```
$ composer require ybelenko/smsgorod-api-client
```

Пример использования
--------------------

[](#пример-использования)

```
require __DIR__ . '/vendor/autoload.php';

use Ybelenko\SmsGorod\SmsGorod;
use Ybelenko\SmsGorod\Message;
use Ybelenko\SmsGorod\Abonent;

// здесь требуется подставить логин и папроль от сервиса SMSGorod
$smsGorod = new SmsGorod('логин', 'пароль');
$sender = 'VIRTA';
$messageType = Message::SMS;
$message = 'Hello World!';

// отправляем смс сообщение одному абоненту при помощи запроса к апи
$response = $smsGorod->sendMessage([
    new Message(
        $messageType,
        $message,
        [
            // телефон получателя смс
            new Abonent('79033256699'),

            // одно сообщение могут получать несколько абонентов
            // new Abonent('79033256699'),
        ],
        $sender
    ),
    // можно отправить несколько сообщений за один запрос
    // new Message(),
]);

// ответ апи в формате JSON
echo json_encode($response->sms, \JSON_PRETTY_PRINT);
```

Запуск автоматических тестов
----------------------------

[](#запуск-автоматических-тестов)

Чтобы запустить тесты нужно склонировать исходники.

```
$ git clone https://github.com/ybelenko/smsgorod-api-client.git smsgorod-api-client-clone
$ cd smsgorod-api-client-clone
$ composer install
$ composer test
```

Автор
-----

[](#автор)

© Юрий Беленко  2015-2019

License
-------

[](#license)

MIT License

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Total

3

Last Release

1518d ago

Major Versions

v1.1.0 → v2.0.02022-03-21

PHP version history (2 changes)v1.0.0PHP ^5.6 || ^7.0

v2.0.0PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc88fb16ce6ab53268f3ea38dec05691aa20360ab4dc91f3ddab815e7625545a?d=identicon)[ybelenko](/maintainers/ybelenko)

---

Top Contributors

[![ybelenko](https://avatars.githubusercontent.com/u/5541023?v=4)](https://github.com/ybelenko "ybelenko (25 commits)")

---

Tags

apiclient-librarynotificationsphpsdksmssmsgorodapisdknotificationssmsclient library

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ybelenko-smsgorod-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/ybelenko-smsgorod-api-client/health.svg)](https://phpackages.com/packages/ybelenko-smsgorod-api-client)
```

###  Alternatives

[jjonline/aliyun-dysms-php-sdk

Aliyun SMS SDK for PHP

2197.2k](/packages/jjonline-aliyun-dysms-php-sdk)[tomatophp/filament-accounts

Manage your multi accounts inside your app using 1 table with multi auth and a lot of integrations

748.3k7](/packages/tomatophp-filament-accounts)[hafael/azure-mailer-driver

Supercharge your Laravel or Symfony app with Microsoft Azure Communication Services (ACS)! Effortlessly add email, chat, voice, video, and telephony-over-IP for next-level communication. 🚀

14109.2k](/packages/hafael-azure-mailer-driver)

PHPackages © 2026

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