Download the PHP package mmdm/sim-fa-sms without Composer

On this page you can find all versions of the php package mmdm/sim-fa-sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sim-fa-sms

Simplicity Fa-SMS

A library for iranian sms panels.

Attention

This is version alpha

Install

composer

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:

and you are good to go.

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)

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

Common methods

fromNumber(string $number)

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

credit($username, $password)

Usually SMS panels need username and password to connect.

setParameter(string $parameter_name, &$parameter_value)

Set extra or needed parameters to do related functionality

getParameter(string $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

send(MessageProvider $numbers)

Send message to some numbers.

MessageProvider is a class that have below methods

getCredit(): float

Get sms panel credit

getStatus(): array

Get status after some operations like send.

The return will be in following structure:

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

isSuccessful(): bool

Return boolean to show if an operation is successful or not

onError(Closure $callback)

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

Supported panels:

NiazPardaz available methods

NiazPardaz methods

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

For rest of methods please see documentation of the panel

getInboxCount(): int

sendBatchSms(MessageProvider $message)

getMessages()

getDelivery()

numberIsInTelecomBlacklist()

extractTelecomBlacklistNumbers()

sendSmsLikeToLike(array $message_providers)

getRecIds(): array

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

License

Under MIT license.


All versions of sim-fa-sms with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-soap Version *
ext-curl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mmdm/sim-fa-sms contains the following files

Loading the files please wait ....