PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Josiah Ovye Yahaya   SmartSMS PHP Send SMS Message   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: SmartSMS PHP Send SMS Message
Deliver SMS messages using the SmartSMS API
Author: By
Last change:
Date: 6 years ago
Size: 729 bytes
 

Contents

Class file image Download

Smartsms

A flexible PHP library for smartsms solutions

Installation

composer require coderatio/smartsms

Usage

require('vendor/autoload.php');

use Coderatio\Smartsms\Smartsms;

$config['token'] = env('SMARTSMS_TOKEN'); 
// Or 
$config['token'] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

$sms = Smartsms::init($config)
    ->to('XXX-XX-XXXX-XXXX')
    ->from('Coderatio')
    ->message('I have installed the library.')
    ->send();
    

Response

The library returns json and object response type.

$sms->asObject(); //Returns response as object

$sms->response(); //Returns as json.

Todo

  1. Send sms from files (txt, pdf, docs, .xls)
  2. Test (Phpunit)