sevenymedia / bulksmscenter-http-api
This package is abandoned and no longer maintained.
No replacement package was suggested.
This repository contains the open source PHP client for the BulkSMSCenter HTTP API
1.1.0.2
2016-10-17 18:25 UTC
Requires
- php: >=5.4
- guzzlehttp/guzzle: ^5.3 || ^6.1
Requires (Dev)
- ext-openssl: *
- phpunit/phpunit: ^4.8 || ^5.2
- vlucas/phpdotenv: ^2.2
README
This repository contains an unofficial open source PHP client for the BulkSMSCenter HTTP API
Requirements
- Get a free BulkSMSCenter account
- The BulkSMSCenter API client for PHP requires at least PHP 5.4.
Installation
####Composer installation
- Download composer
- Require this package with composer:
composer require sevenymedia/bulksmscenter-http-api
- Or add
"sevenymedia/bulksmscenter-http-api": "~1.0"
manually to therequire
section of yourcomposer.json
and runcomposer install
.
{
"require": {
"sevenymedia/bulksmscenter-http-api": "~1.0"
}
}
####Manual installation
If you do not (want to) use Composer. You can git clone
or download this repository and include the client manually.
Usage
First, set up a BulkSmsCenter\Client
. Replace YOUR_BULKSMSCENTER_USERNAME and YOUR_BULKSMSCENTER_PASSWORD with your BulkSMSCenter credentials.
require 'bootstrap.php'; $client = new \BulkSmsCenter\Client(new \BulkSmsCenter\Auth( 'YOUR_BULKSMSCENTER_USERNAME', 'YOUR_BULKSMSCENTER_PASSWORD' ));
You might also need a BulkSmsCenter\Message
.
$message = new \BulkSmsCenter\Message([ 'body' => 'TEXT_MESSAGE', 'recipient' => 'RECIPIENT_NUMBER', 'sender' => 'SENDER_NUMBER', ]);
You are now able to connect to the BulkSMSCenter API
// Send a message $credits = $client->sendMessage($message); // Get a message status $credits = $client->getMessageStatus($message->getId()); // Retrieve your remaining credits $credits = $client->getBalance();
Official Documentation
Documentation for the framework can be found on the BulkSMSCenter website.
License
This client is open-sourced software licensed under the MIT license.