PHPackages                             mmdm/sim-fa-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. mmdm/sim-fa-sms

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

mmdm/sim-fa-sms
===============

A simple yet nice SMS library

v0.1.2(4y ago)119MITPHPPHP &gt;=7.2

Since Oct 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mmdm95/sim-fa-sms)[ Packagist](https://packagist.org/packages/mmdm/sim-fa-sms)[ RSS](/packages/mmdm-sim-fa-sms/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

Simplicity Fa-SMS
=================

[](#simplicity-fa-sms)

A library for iranian sms panels.

Attention
---------

[](#attention)

This is version alpha

Install
-------

[](#install)

**composer**

```
composer require mmdm/sim-fa-sms
```

Or you can simply download zip file from github and extract it, then put file to your project library and use it like other libraries.

Just add line below to autoload files:

```
require_once 'path_to_library/autoloader.php';
```

and you are good to go.

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

[](#how-to-use)

For convenient it has a factory class that can instantiate appropriate class according to your panel. If there is no such panel type, it'll return **null**.

#### `instance(int $type)`

[](#instanceint-type)

```
// SMSFactory from Sim\SMS\SMSFactory namespace
$panel = SMSFactory::instance(SMSFactory::PANEL_NIAZPARDAZ);
```

Or you can simply create an instance from a specific panel like a simple class

```
$niazPardaz = new \Sim\SMS\Factories\NiazPardaz();
```

Common methods
--------------

[](#common-methods)

#### `fromNumber(string $number)`

[](#fromnumberstring-number)

If panel supports specifying your panel number, you can use this method.

```
$panel->fromNumber(your_panel_number);
```

#### `credit($username, $password)`

[](#creditusername-password)

Usually SMS panels need username and password to connect.

```
$panel->credit(your_panel_username, your_panel_password);
```

#### `setParameter(string $parameter_name, &$parameter_value)`

[](#setparameterstring-parameter_name-parameter_value)

Set extra or needed parameters to do related functionality

```
$panel->setParameter('fromNumber', your_panel_number);
// also you can set parameter like an object
$panel->fromNumber = your_panel_number;
```

#### `getParameter(string $parameter_name, $prefer = null)`

[](#getparameterstring-parameter_name-prefer--null)

Get a parameter if is exists or returns `$prefer`

Note: When you use object accessing, it'll returns **null** and triggers error

```
$panel->getParameter('fromNumber');
// also you can get parameter like an object
$panelNumber = $panel->fromNumber;
```

#### `send(MessageProvider $numbers)`

[](#sendmessageprovider-numbers)

Send message to some numbers.

##### `MessageProvider` is a class that have below methods

[](#messageprovider-is-a-class-that-have-below-methods)

- #### `setNumbers(array $numbers)`

    [](#setnumbersarray-numbers)

    ```
      Set numbers that want send message to

    ```
- #### `getNumbers(): array`

    [](#getnumbers-array)

    ```
      Get numbers that want send message to

    ```
- #### `withBody(string $body)`

    [](#withbodystring-body)

    ```
      Specify the message to send

    ```
- #### `getBody(): string`

    [](#getbody-string)

    ```
      Get the message to send

    ```

#### `getCredit(): float`

[](#getcredit-float)

Get sms panel credit

```
$creditCount = $panel->getCredit();
```

#### `getStatus(): array`

[](#getstatus-array)

Get status after some operations like *send*.

The return will be in following structure:

```
[
  'code' => a code according to operation,
  'message' => a message according to code,
]
```

In some operations the *status* will be an array of previous structure.

```
[
  [
    'code' => a code according to operation,
    'message' => a message according to code,
  ],
  [
    'code' => a code according to operation,
    'message' => a message according to code,
  ],
  ...
]
```

#### `isSuccessful(): bool`

[](#issuccessful-bool)

Return boolean to show if an operation is successful or not

```
// call after an operation
$isSuccessful = $panel->isSuccessful();
```

#### `onError(Closure $callback)`

[](#onerrorclosure-callback)

Set a closure when an error happen. This closure have three parameters to access:

- error code
- error message
- parameters of the functionality

```
$panel->onError(function ($code, $message, $parameters) {
  // do something
});
```

Supported panels:

- NiazPardaz

#### NiazPardaz available methods

[](#niazpardaz-available-methods)

NiazPardaz methods
------------------

[](#niazpardaz-methods)

#### `__construct(string $username = null, string $password = null)`

[](#__constructstring-username--null-string-password--null)

```
$niazPardaz = new \Sim\SMS\Factories\NiazPardaz();
// or add credentioal information in construct
$niazPardaz = new \Sim\SMS\Factories\NiazPardaz(panel_username, panel_password);
```

For rest of methods please see documentation of the panel

#### `getInboxCount(): int`

[](#getinboxcount-int)

#### `sendBatchSms(MessageProvider $message)`

[](#sendbatchsmsmessageprovider-message)

#### `getMessages()`

[](#getmessages)

#### `getDelivery()`

[](#getdelivery)

#### `numberIsInTelecomBlacklist()`

[](#numberisintelecomblacklist)

#### `extractTelecomBlacklistNumbers()`

[](#extracttelecomblacklistnumbers)

#### `sendSmsLikeToLike(array $message_providers)`

[](#sendsmsliketolikearray-message_providers)

#### `getRecIds(): array`

[](#getrecids-array)

- Use with send method

Add new panel
-------------

[](#add-new-panel)

To add a new panel you can implement `ISMS` interface.

Or if you want to have some functionality you can extend `AbstractSMS`and add your new functionality for new panel.

License
=======

[](#license)

Under MIT license.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Total

3

Last Release

1731d ago

### Community

Maintainers

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

---

Top Contributors

[![mmdm95](https://avatars.githubusercontent.com/u/26489185?v=4)](https://github.com/mmdm95 "mmdm95 (22 commits)")

### Embed Badge

![Health badge](/badges/mmdm-sim-fa-sms/health.svg)

```
[![Health](https://phpackages.com/badges/mmdm-sim-fa-sms/health.svg)](https://phpackages.com/packages/mmdm-sim-fa-sms)
```

###  Alternatives

[ideea/language-detector

Detect languages by text

334.4k](/packages/ideea-language-detector)

PHPackages © 2026

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