Download the PHP package mediumart/orange-sms without Composer
On this page you can find all versions of the php package mediumart/orange-sms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mediumart/orange-sms
More information about mediumart/orange-sms
Files in mediumart/orange-sms
Package orange-sms
Short Description A php library to interact with the orange sms api for MiddleEast and Africa.
License MIT
Informations about the package orange-sms
orange-sms
Description
A php library to interact with the orange sms api for MiddleEast and Africa.
Installation
Using composer:
Usage
First you need to resolve a SMSClient
instance:
next step, create an SMS
object passing it the $client
:
and you're good to go:
You now have access to the full orange sms api through the $sms
object :
All json
responses will automatically be converted to array
.
Be sure to lookup the official documentation, to see what to expect as a response
to each call.
Access Token
When you resolve the SMSClient
instance using your client_id
and client_secret
, a new access token will be fetched from the api server and automatically set on the instance, along with its lifetime in seconds.
We recommend saving the token (maybe to your database) for future use, at least within the limit of its validity period. this will help speed up requests to the api.
Use the getToken()
and getTokenExpiresIn()
to get those values from the instance:
If you wish, you can also fetch your access token directly without resolving a client instance, using the static authorize
method:
this will return as $response
, an array of this form:
SSL Certificate check issue
If you experience ssl certificate checking issue, in your local environment. You can disable the check temporarily with the following line, before starting to interact with the api in your code.
Just for testing purposes though. You should never do this on a production server.
License
Mediumart orange-sms is an open-sourced software licensed under the MIT license.