Esendex PHP SMS SDK
Our PHP SDK is an easy to use client for our REST API that you can use to integrate SMS and Voice messaging into your PHP application. It contains a set of services which you can use to send SMS and Voice messages, receive SMS, track the status of your sent messages and more.
Requirements
- PHP >= 7.3.0
- ext-curl enabled
- An internet connection
- An Esendex Account (create your account)
Installation
The Esendex PHP SDK is available via direct download, source and PHP package managers Composer and PEAR
Direct Download and Source Code
You can download the current version of the Esendex PHP SDK or clone the Github repository.
We provide a PSR-0 autoloader that you can use for your convenience:
More information on Autoloading classes in PHP is available here
Composer
If you are using Composer in your PHP project for dependency management, you can add the following snippet to your composer.json
The Esendex PHP SDK is published to Packagist so adding esendex/sdk
to your composer.json
file will add the SDK as a dependency.
To use the Esendex PHP SDK you need to ensure that the Composer autoload is added to your code.
More information on Autoloading classes in PHP is available here
PEAR
You can use PEAR to install the Esendex PHP SDK using PEAR v1.9.3 or newer with the following commands:
We provide a PSR-0 autoloader that you can use for your convenience:
More information on Autoloading classes in PHP is available here
Getting Started
Sending messages
Getting inbox messages
Track message status
Getting full message bodies
Testing
Unit Tests
A suite of tests can be found in the 'test' directory. To run them use the phing build utility. e.g.
Credentials Test
You can check your account credentials using a phing task we have provided.