Download the PHP package oxemis/oxisms without Composer

On this page you can find all versions of the php package oxemis/oxisms. 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 oxisms

Official OxiSMS PHP Wrapper

MIT License Current Version

Overview

This repository contains the official PHP wrapper for the OxiSMS API. To get started, create an account and request your free credits on this page

This library is a wrapper for the OxiSMS API but you don't have to know how to use the API to get started with this library.

What is OxiSMS ?

OxiMailing is a solution designed to enable you to send your SMS quickly and easily.

We offer worldwide coverage (see details) and sender personalization when authorized by recipient operators.

All our SMS messages are sent via Premium routes, guaranteeing the best possible deliverability.

We're a small team, but we're recognized for the quality of our support and expertise.

Table of contents

Compatibility

This library requires PHP v7.4 or higher.

Installation

Use the below code to install the wrapper:

composer require oxemis/oxisms

Authentication

This library is a wrapper to the OxiSMS API. You can request an API KEY in your OxiSMS Account. Free credits are offered.

You should export your API_LOGIN and API_PASSWORD in order to use them in this library :

Initialize your OxiSms Client:

Getting information about your account

You will find all the information about your OxiSMS account with the "UserAPI" object. Informations returned are documented in the class.

Sending your first SMS

In order to send a mail, you must instantiate a Message object and, send it, via the $client->sendAPI->Send() method.

Here's a simple sample of how to send a SMS :

You can also schedule a sending by using the $message->setScheduledDateTime($selectedDateAndTime) method.

How to send customized messages?

With this library you can send customized messages based on templating. Basically, every content between {{ and }} will be replaced by the corresponding recipient metadata.

Here is a simple sample :

Two messages will be sent. The first one will be "Hi Joe ! This is your ID : 1", the second one : "Hi Jane ! This is your ID : 2".

Using a custom sender

By default, our SMS are sent with a short code (36xxx in France for example) or a specific phone number. But, as we send SMS using Premium routes, you can specify a custom sender in your messages.

Please note that some operators refuse to receive messages with custom senders. In these cases, we'll replace the sender with a short code. You can check the coverage about this.

Custom senders like phone numbers are not allowed to prevent spoofing !

The sender MUST respect these requirements :

And please not that, if you use the commercial strategy and a custom sender, an unsubscribe method will be added to your message (STOP SMS 36111 for example). This can increase the length of the message.

Ok for you ? So let's set the sender in our previous sample with the setSender method:

How many characters can I put in my message ?

Not an easy answer ! SMS are basically limited to 160 characters.

BUT, if your message contains characters that are not in the GSM alphabet (e.g. emojis or some accented characters like ĂȘ) we'll have to send you messages in unicode mode. In this case SMS are limited to 70 characters.

Not enough ? No problem ! Our platform is able to manage long sms so that you can send messages composed by 8 SMS (it's totaly transparent for your recipients, the parts are concatened). But in this case SMS are limited to 153 characters (GSM) or 67 characters (Unicode).

So, TLDR; :

How to get the number of credits that will be used for a sending ?

As we've seen above, calculate the cost of a sending is not as simple as counting the number of recipients 😁

If you want to get the future cost of a sending, use the $client->sendAPI->getCostOfMessage($m) method !

You can also set a MaxCreditsPerSending on your message. If that cost is exceeded, OxiSMS will refuse to send your message.

This example will throw an API Exception :

How to specify a strategy for my sending ?

Strategy is very important for your message.

There are two different stragtegies available :

Strategy Meaning Restrictions
Commecial (default) Used for marketing messages. All sendings in 'commercial' strategy are not allowed in the evening after 9:00 p.m., in the morning before 8:00 a.m. as well as on Sundays and public holidays. They will not be rejected, they will be automatically postponed to the next available period.
Notification Used for notifications (password reset, two factors auth...) No restriction

Please be very careful selecting the strategy. Sending marketing messages with "Notification" strategy will probably lock your account cause of "complaints" from your recipients !

To specify your strategy, set it in the Message :

Other features

You'll find a lot of other features by exploring the *API objects in the APIClient. Here is a non-exhaustive list of these objects (each one is documented with PHPDoc).

Each object is documented with PHPDoc. Other features will be added in the future. You can also make direct call to the API (and even contribute to this project !). Please take a look at the API Reference 😀

Contribute

Feel free to ask anything, and contribute to this project. Need help ? 👉 [email protected]


All versions of oxisms with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.8
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 oxemis/oxisms contains the following files

Loading the files please wait ....