PHPackages                             creattico/yeastar-socket-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. [HTTP &amp; Networking](/categories/http)
4. /
5. creattico/yeastar-socket-sms

ActiveLibrary[HTTP &amp; Networking](/categories/http)

creattico/yeastar-socket-sms
============================

PHP class to send SMS via socket API through Yeastar TGxxxx gateways

v1.1.0(3mo ago)32201MITPHPPHP &gt;=7.4

Since May 20Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/creattico/yeastar-socket-sms)[ Packagist](https://packagist.org/packages/creattico/yeastar-socket-sms)[ RSS](/packages/creattico-yeastar-socket-sms/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (7)DependenciesVersions (9)Used By (0)

Yeastar Socket SMS
==================

[](#yeastar-socket-sms)

PHP library to send SMS via socket API through Yeastar TGxxxx gateways.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4

Install
-------

[](#install)

```
composer require creattico/yeastar-socket-sms
```

Usage
-----

[](#usage)

```
use YeastarSocket\SocketApi;
use YeastarSocket\Exceptions\SocketConnectionException;
use YeastarSocket\Exceptions\SmsSendException;

$sms = new SocketApi([
    'host'         => 'domain.ext',       // Yeastar gateway host or IP
    'port'         => 5038,               // AMI port (default: 5038)
    'gateway_port' => 1,                  // trunk port (default: 1)
    'account'      => 'username',
    'password'     => 'password',
    'to'           => '0039123456789',    // recipient number with country code
    'message'      => 'Your message here',
    'timeout'      => 5,                  // socket timeout in seconds (default: 5)
    'debug'        => true,               // optional: enable debug logging
]);

try {
    $sms->sendSms();
} catch (SocketConnectionException $e) {
    // connection or authentication failed
    echo $e->getMessage();
} catch (SmsSendException $e) {
    // SMS command failed
    echo $e->getMessage();
} finally {
    $sms->closeSocket();
}
```

Debug
-----

[](#debug)

Set `debug` to `true` to collect log messages:

```
print_r($sms->log);
```

Exceptions
----------

[](#exceptions)

ExceptionWhen`SocketConnectionException`Cannot connect to the gateway or authentication fails`SmsSendException`SMS command fails or recipient is missingLicense
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance79

Regular maintenance activity

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Recently: every ~349 days

Total

8

Last Release

108d ago

PHP version history (3 changes)1.0.0PHP 7.2

1.0.1PHP &gt;=7.2

v1.1.0PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2142691?v=4)[Domenico Carbone](/maintainers/creattico)[@creattico](https://github.com/creattico)

---

Top Contributors

[![creattico](https://avatars.githubusercontent.com/u/2142691?v=4)](https://github.com/creattico "creattico (10 commits)")

### Embed Badge

![Health badge](/badges/creattico-yeastar-socket-sms/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.8k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M90](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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