Download the PHP package tamkeenlms/mobily-sms-api without Composer

On this page you can find all versions of the php package tamkeenlms/mobily-sms-api. 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 mobily-sms-api

About

Mobily.ws is the number one provider for SMS services in the gulf region, but many of their APIs are outdated and badly designed. This is a non-official rewrite of their PHP API client, you will find it more flexible and up-to-date.

Installation

You simply need to require it through Composer:

How it works

You start by defining an API "Client", you can define multible API clients and chose with every request the client through which it will be made. Here's an example:

A new MobilyAPI\Client accepts the following arguaments:

Here is an example:


Requests

Through a Client you can make an API request. Of course the request you make will affect the account you chosen for the client through which you made the request. Here is an example for a request that checks the serivce/sending status:

Mobilys's API has a specific number of functions, each function is represented in this library as a request. Each request has its own class, that you can call directly. So, instead of calling a request through a client you can create a new request and pass it a client. Here's how:

Each request has its own set of methods that are specific to it. Here is an example:

Each request you make has these methods:

BTW, you could pull this off in a one-liner, like so:


Responses

Each request you make returns an instance of the Response class, which offers the following:

Example:


Checking service status


Sending a new SMS

Sending a new SMS via this client is done through the Requests\SendSMS request class:

And here are the args it takes:

The Requests\SendSMS class has these methods:

Here are the examples:

Schedule for later:

You might want to check Carbon, it's pure awesome.

You can cancel a scheduled new message like this:

Sending a template message:


Deleting a scheduled message

To delete a schedule message you need the message deletion key

If you send a message through Requests\SendSMS you can get this message deletion key back using getDeletionKey(). Example:


Retrieving your balance

Hope you find this useful, and please feel free to contact us any time with any questions. Good luck


All versions of mobily-sms-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
guzzlehttp/guzzle Version ~6.0
nesbot/carbon Version ^1.21
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 tamkeenlms/mobily-sms-api contains the following files

Loading the files please wait ....