2017 © Pedro Peláez
 

library sms-sender

SMS sender library

image

tugmaks/sms-sender

SMS sender library

  • Friday, December 19, 2014
  • by tugmaks
  • Repository
  • 0 Watchers
  • 0 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SMS sender library

SMS sender library, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Add, (*3)

"tugmaks/sms-sender": "dev-master"

to the require section of your composer.json file., (*4)

Usage

Once the extension is installed, simply use it in your code by :, (*5)

use tugmaks/SMS/gates/ItakazanGate;
$gate = new ItakazanGate([
    'login'=>'yourlogin',
    'password'=>'yourpassword',
    'mac'=>'yourmac',
]);

echo $gate->getBalance();

By default Itakazan gate use one url to access its api. You can get it via $gate->getGateUrl(). If this gate will use another url or mirrors you can redefine it like this:, (*6)

use tugmaks/SMS/gates/ItakazanGate;
$gate = new ItakazanGate([
    'login'=>'yourlogin',
    'password'=>'yourpassword',
    'mac'=>'yourmac',
]);
$gate->setGateUrl = 'http://new-api-address.me';

Error handling. Each request to api will return its result or false if error occured. To get error respresentation you can use this code:, (*7)

if(!$gate->someMethod()){
    //handle error here
    echo $gate->getError();
}

Methods. * $gate->getBalance() will return current balance (float) or false if error occured. * php $gate->getSignatures() return array of allowed signatures or false if error occured. Example : php [0=>'signat1',1=>'loremsignat']. * php $gate->getPrices() * addSignature() * deleteSignature() * getArchive() * send(), (*8)

The Versions

19/12 2014

dev-master

9999999-dev

SMS sender library

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Maxim Tugaev

sms