Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

This repository contains an unofficial open source PHP client for the BulkSMSCenter HTTP API

License

Notifications You must be signed in to change notification settings

sevenymedia/bulksmscenter-http-api

Repository files navigation

bulksmscenter-http-api

Latest Stable Version Latest Unstable Version StyleCI Dependency Status Build Status SensioLabsInsight Total Downloads Software License

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

composer require sevenymedia/bulksmscenter-http-api
  • Or add "sevenymedia/bulksmscenter-http-api": "~1.0" manually to the require section of your composer.json and run composer 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.

About

This repository contains an unofficial open source PHP client for the BulkSMSCenter HTTP API

Resources

License

Stars

Watchers

Forks

Packages

No packages published