PHPackages                             daniyal2959/persian-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. daniyal2959/persian-sms

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

daniyal2959/persian-sms
=======================

Package for send sms from any persian service provider to numbers

1.1.0(2y ago)413MITPHP

Since Feb 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/daniyal2959/persian-sms)[ Packagist](https://packagist.org/packages/daniyal2959/persian-sms)[ Docs](https://github.com/daniyal2959/persian-sms)[ RSS](/packages/daniyal2959-persian-sms/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)DependenciesVersions (3)Used By (0)

[![alt text](resources/images/logo.svg)](resources/images/logo.svg)

PHP SMS Services
================

[](#php-sms-services)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/82de163cd0189aaf0ac437342ed2e71fd9ec65c19d56a87930e6d90277b3fbec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616e6979616c323935392f7065727369616e2d736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/daniyal2959/persian-sms)[![Total Downloads on Packagist](https://camo.githubusercontent.com/d7d0ad26bdc95a98cf1e822827026f7f68707ef4d27fcd8c53c97205c0ff2f18/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64616e6979616c323935392f7065727369616e2d736d732e7376673f636f6c6f723d253233463138267374796c653d666c61742d737175617265)](https://packagist.org/packages/daniyal2959/persian-sms)

This is a PHP library for Sms Services Integration. This library supports `PHP 8.0+`.

For PHP integration you can use [daniyal2959/persian-sms](https://github.com/daniyal2959/persian-sms) package.

> This packages works with multiple drivers, and you can create custom drivers if you can't find them in the [current drivers list](#list-of-available-drivers) (below list).

List of available drivers
=========================

[](#list-of-available-drivers)

- [ippanel](https://ippanel.com/) ✔️
- [kavenegar](https://kavenegar.com/) ✔️
- Others are under way.

**Help me to add the services below by creating `pull requests`**

- farazsms.com
- sms.ir
- mellipayamak.com
- farapayamak.ir
- ...

> All services that work with ippanel can used default service `ippanel`

> you can create your own custom drivers if it's not exists in the list, read the `Create custom drivers` section.

Install
-------

[](#install)

Via Composer

```
$ composer require daniyal2959/persian-sms
```

Configure
---------

[](#configure)

Just include library's `autoload.php` file in your code

```
include_once 'vendor/autoload.php'
```

There is not any config file in this package. so you can set settings for your sms service provider in your code.

How to use
----------

[](#how-to-use)

available methods:

- `driver`: set the driver
- `text`: set the message to send without pattern
- `patten`: set your pattern code
- `data`: set array of data pattern
- `to`: set array of numbers receivers
- `from`: set sender number
- `send`: send your sms and return response as json or plain string

### Methods with Parameters

[](#methods-with-parameters)

MethoddrivertextpatterndatatofromcredentialsendParameter$key$text$pattern\_code$data$numbers$number$credentials$asJsonTypestringstringstringarrayarraystringarraybooleanRequired\*\*\*\*\*#### Example for sending sms message from kavenegar service provider:

[](#example-for-sending-sms-message-from-kavenegar-service-provider)

```
$apiKey = '';
$sms = new SMS($apiKey);
$response = $sms->driver('kavenegar')
    ->text('')
    ->from('')
    ->to('')
    ->send();
```

#### Example for sending sms pattern from kavenegar service provider:

[](#example-for-sending-sms-pattern-from-kavenegar-service-provider)

```
$apiKey = '';
$sms = new SMS($apiKey);
$response = $sms->driver('kavenegar')
    ->pattern('')
    ->data('') #E.g:['%token' => '1234']
    ->from('')
    ->to('')
    ->send();
```

#### Example for sending sms message from ippanel service provider:

[](#example-for-sending-sms-message-from-ippanel-service-provider)

```
$apiKey = '';
$sms = new SMS($apiKey);
$response = $sms->driver('ippanel')
    ->text('')
    ->from('')
    ->to('')
    ->send();
```

#### Example for sending sms pattern from ippanel service provider:

[](#example-for-sending-sms-pattern-from-ippanel-service-provider)

```
$apiKey = '';
$sms = new SMS($apiKey);
$response = $sms->driver('ippanel')
    ->pattern('')
    ->data('')
    ->from('')
    ->to('')
    ->send();
```

#### Create custom drivers:

[](#create-custom-drivers)

You can create your custom driver with one step. this step is:

Created a class: `Sms\Driver\MyDriver`.

```
namespace Sms\Driver;

use Sms\Contract\IDriver;
use Sms\Driver;

class MyDrive extends Driver implements IDriver
{
    const BASE_URL = '';

    /**
     * @return void
     */
    public function __construct()
    {
        $this->client = new Http(self::BASE_URL, 30, []);
    }

    /**
     * @return bool|mixed|string
     */
    public function sendPattern()
    {
        // TODO: Implement send pattern code for current service provider
    }

    /**
     * @param $text
     * @return bool|mixed|string
     */
    public function message($text)
    {
        // TODO: Implement send message code for current service provider
    }

    /**
     * @return void
     */
    public function setCredential()
    {
        // TODO: Implement set credential code for current service provider
    }
}
```

Donate (if you like it ❤️)
--------------------------

[](#donate-if-you-like-it-️)

[![](https://camo.githubusercontent.com/e13f2d5fb1e9f4c14ecb1fb7c07459938035495a8309a65d83e638ef9500e89b/68747470733a2f2f636f66666565626564652e69722f44617368626f61726454656d706c61746556322f6170702d6173736574732f696d616765732f62616e6e65722f64656661756c742d79656c6c6f772e737667)](https://www.coffeebede.com/daniyal_s)

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [daniyal2959](https://github.com/daniyal2959)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Total

2

Last Release

857d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a764e98c1b646cd01eccc1e68759d04424062040ed5c1d9b471e4ade275bd80?d=identicon)[daniyal2959](/maintainers/daniyal2959)

---

Top Contributors

[![Daniyal-SDP](https://avatars.githubusercontent.com/u/231461180?v=4)](https://github.com/Daniyal-SDP "Daniyal-SDP (22 commits)")

---

Tags

smskavenegarGhasedakiranian-smsIPPanelfarazsmssms irsms iraniran smssms service provider

### Embed Badge

![Health badge](/badges/daniyal2959-persian-sms/health.svg)

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

###  Alternatives

[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

319270.8k6](/packages/tzsk-sms)[php-smpp/php-smpp

PHP-based SMPP client lib

236203.5k8](/packages/php-smpp-php-smpp)[instasent/sms-counter-php

SMS Counter PHP Class Library which detects encoding of an SMS message text, counts the characters as per the encoding and gives page limit information.

501.4M4](/packages/instasent-sms-counter-php)[alexandr-mironov/php-smpp

PHP SMPP client lib, fork of onlinecity/php-smpp

5072.0k](/packages/alexandr-mironov-php-smpp)[benmorel/gsm-charset-converter

Converts GSM 03.38 strings to and from UTF-8

16477.7k](/packages/benmorel-gsm-charset-converter)[matthewbdaly/sms-client

A generic SMS client library. Supports multiple swappable drivers.

2293.6k2](/packages/matthewbdaly-sms-client)

PHPackages © 2026

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