Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bankiru/sms-online-php

PHP binding for sms-online.ru SMS gateway
https://github.com/bankiru/sms-online-php

sms sms-client sms-online

Last synced: about 1 month ago
JSON representation

PHP binding for sms-online.ru SMS gateway

Awesome Lists containing this project

README

        

# sms-online SMS
PHP binding for sms-online.ru SMS gateway

## Installation

```sh
composer require bankiru/sms-online
```

## Usage

### Standalone

```php
send(new MySms('1234567890', 'message body'));
```

### Symfony

Register bundle to the kernel

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

Configure the sender

```yaml
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

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