PHPackages                             descom/sms-php - 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. descom/sms-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

descom/sms-php
==============

Build your SMS application with PHP, easy SMS sending and worldwide coverage

v1.3.0(2y ago)02402MITPHPPHP ~8.1CI failing

Since Sep 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/descom-es/sms-php)[ Packagist](https://packagist.org/packages/descom/sms-php)[ Docs](https://www.descomsms.com)[ RSS](/packages/descom-sms-php/feed)WikiDiscussions 1.0 Synced 4d ago

READMEChangelog (10)Dependencies (2)Versions (20)Used By (0)

[![Build Status](https://camo.githubusercontent.com/1f3ef677c65d59eca8e4823c18bed2a4a05879c20bdf2e775c7ab115b72997fa/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f646573636f6d2d65732f736d732d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/descom-es/sms-php)[![StyleCI](https://camo.githubusercontent.com/ceac6d1e4cb88b021d4108d31377c685af01dba17cb91ad674f750aa3c53de50/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130333236353330342f736869656c64)](https://styleci.io/repos/103265304)[![Latest Stable Version](https://camo.githubusercontent.com/a8d7904abd76094e3e793775d88bb1cf7a91f8c8a862dc321620205e6d7ff0d7/68747470733a2f2f706f7365722e707567782e6f72672f646573636f6d2f736d732d7068702f76657273696f6e3f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/descom/sms-php)[![Total Downloads](https://camo.githubusercontent.com/8eea0ec31f0802f02691a6baf0cc1e0c37308744639dcbe3bca5d8893a93f4d5/68747470733a2f2f706f7365722e707567782e6f72672f646573636f6d2f736d732d7068702f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/descom/sms-php)[![License](https://camo.githubusercontent.com/d8ff7f362704b2e496d6f081d636973d9dbf2954dc14520dc65c797494a9979a/68747470733a2f2f706f7365722e707567782e6f72672f646573636f6d2f736d732d7068702f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/descom/sms-php)

PHP SMS sending
===============

[](#php-sms-sending)

SMS Library for sending text messages to mobile numbers worldwide from your own application via [Descom SMS](https://www.descomsms.com) gateway.

Create your free account at [Descom SMS](https://www.descomsms.com) and buy credits for SMS sending when required.

Our [API documentation](https://api.descomsms.com) is available [here](https://api.descomsms.com). Also, we will be happy to assist you at  for further info on your SMS project.

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

[](#installation)

You can install it with composer:

```
composer require descom/sms-php
```

Usage
-----

[](#usage)

### Send single SMS

[](#send-single-sms)

This is an example:

```
$sms = new Sms(new AuthUser('your_username', 'your_password'));

$message = new Message();

$message->addTo('mobile_number')->setText('message_text');

$result = $sms->addMessage($message)
        ->setDryrun(true)
        ->send();
```

### Send multiple SMS

[](#send-multiple-sms)

You can send multiple SMS in one go, function `addTo`:

```
//...

$message->addTo('mobile_number_1')
        ->addTo('mobile_number_2');

//...
```

or with an Array:

```
//...

$message->addTo([
    'mobile_number_1',
    'mobile_number_2'
]);
//...
```

### Check your account balance

[](#check-your-account-balance)

The function `getBalance` allows you to check your SMS balance, this is your credit available. Example:

```
$sms = new Sms(new AuthUser('replace_by_your_usernme', 'replace_by_your_password'));

$balance = $sms->getBalance();

echo 'Your balance is '.$balance."\n";
```

### Get list of senderID authorized

[](#get-list-of-senderid-authorized)

The function `getSenderID` allows you get the list of senderID authorized. Example:

```
$sms = new Sms(new AuthUser('replace_by_your_usernme', 'replace_by_your_password'));

$senderID = $sms->getSenderID();

echo 'Your balance is '.PHP_EOL;
print_r($senderID);
```

### Setup your sender ID

[](#setup-your-sender-id)

Alphanumeric sender ID allows you to set your name or business brand as the sender ID. Use the function `setSenderID` at `Descom\Sms\Message` class

```
$message->setSenderID('replace_by_sender_of_message');
```

Note your sender ID should previously be added in your Descom SMS account setup.

### Test your SMS sending application for free

[](#test-your-sms-sending-application-for-free)

Test your SMS sending application at no cost by using function `setDryrun` in the class `Descom\Sms\Sms` and set to `true`

```
$sms->setDryrun(true);
```

Dryrun just simulates SMS sending; no message will be sent out and no SMS credit will be deducted from your account.

Examples
--------

[](#examples)

Examples available at folder Examples.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 91.1% 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 ~147 days

Recently: every ~514 days

Total

16

Last Release

960d ago

PHP version history (3 changes)v1.0.1PHP ^5.6 || ^7.0

1.0.12PHP ^5.6|^7.0

1.0.x-devPHP ~8.1

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/86e19cbb9d727adc8ed5d189c3cb72e364708c730b5d5469f6ecee7d5393fa89?d=identicon)[descom](/maintainers/descom)

---

Top Contributors

[![cesargb](https://avatars.githubusercontent.com/u/25681494?v=4)](https://github.com/cesargb "cesargb (82 commits)")[![pilarDescom](https://avatars.githubusercontent.com/u/31917228?v=4)](https://github.com/pilarDescom "pilarDescom (6 commits)")[![llorensjj](https://avatars.githubusercontent.com/u/7073372?v=4)](https://github.com/llorensjj "llorensjj (1 commits)")[![TortitasT](https://avatars.githubusercontent.com/u/76071376?v=4)](https://github.com/TortitasT "TortitasT (1 commits)")

---

Tags

descomphpsdksmsphpsmsdescom

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/descom-sms-php/health.svg)

```
[![Health](https://phpackages.com/badges/descom-sms-php/health.svg)](https://phpackages.com/packages/descom-sms-php)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[amirbagh75/smsir-php

Unofficial sms.ir PHP Package

181.2k](/packages/amirbagh75-smsir-php)

PHPackages © 2026

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