kield01/smsc-ua

There is no license information available for the latest version (0.2) of this package.

SMSC UA package for PHP

0.2 2019-03-12 18:55 UTC

This package is auto-updated.

Last update: 2024-12-13 12:09:14 UTC


README

What's that?

This is the package, to send regular SMS to any available recipient

Prerequisites

  • Register account via SMSC.UA
  • Fill up balance with a little amount

Installation

composer require kield01/smsc-ua

Usage

use KielD01\SmscUA\Sender;
use KielD01\SmscUA\Types\Sms;

/** Available Methods List */

/** Set Credential to access the API */
Sender::setCredentials(['__LOGIN__', '__PWD__']);
Sender::setCredentials('__LOGIN__', '__PWD__');

/** Set error messages locale */
Sender::setLocale('ua');

$sms = new Sms();

$response = $sms
    ->setPhones(
    ['380666666666'] || // As an array of numbers
    '380666666666,380666666667;380666666668' || // As the string, delimited by symbols like '`,`, `;`, and/or `|`'
    '380666666666'
    )
    ->setMessage('Test Message') // Sets string as message
    ->send(); // Deliver messages via API