2017 © Pedro Peláez
 

library sms-online

Bindings for sms-online.ru SMS gateway

image

bankiru/sms-online

Bindings for sms-online.ru SMS gateway

  • Tuesday, January 10, 2017
  • by scaytrase
  • Repository
  • 2 Watchers
  • 1 Stars
  • 5,489 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 2 Versions
  • 13 % Grown

The README.md

sms-online SMS

PHP binding for sms-online.ru SMS gateway, (*1)

Installation

composer require bankiru/sms-online

Usage

Standalone

<?php

use Bankiru\Sms\SmsOnline\SmsOnline;
use Bankiru\Sms\SmsOnline\SmsOnlineTransport;
use ScayTrase\SmsDeliveryBundle\Service\ShortMessageInterface;

class MySms implements  ShortMessageInterface {
    /* ... */
}

$transport = new SmsOnlineTransport(
    new SmsOnline(new \GuzzleHttp\Client(), 'user', 'pass', 'https://service.qtelecom.ru/public/http/'),
    'friendly_man',
    new \Psr\Log\NullLogger(),
    '_transaction_prefix'
);
$transport->send(new MySms('1234567890', 'message body'));

Symfony

Register bundle to the kernel, (*2)

class AppKernel extends Kernel {
    public function registerBundles() {
        return [
            //...
            new \ScayTrase\SmsDeliveryBundle\SmsDeliveryBundle();
            new \Bankiru\Sms\QtSms\QtSmsBundle(),
            //...
        ];
    }
}

Configure the sender, (*3)

sms_delivery:
  transport: sms_online.transport

sms_online:
    login: user
    password: pass
    url: https://bulk.sms-online.com/
    sender: friendly_man
    transaction_prefix: _transaction_prefx_

Send SMS, (*4)

class MyController extends Controller {
    public function sendAction() {
        $this->get('sms_delivery.sender')->spoolMessage(new MySms('1234567890', 'message body'));
    }
}

The Versions

10/01 2017

dev-master

9999999-dev

Bindings for sms-online.ru SMS gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Batanov

sms

10/01 2017

1.0

1.0.0.0

Bindings for sms-online.ru SMS gateway

  Sources   Download

MIT

The Requires

 

The Development Requires

by Pavel Batanov

sms