Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bankiru/sms-online-php
- Owner: bankiru
- License: mit
- Created: 2016-12-14T07:22:58.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-07T15:53:39.000Z (about 2 years ago)
- Last Synced: 2024-10-28T06:08:31.043Z (about 2 months ago)
- Topics: sms, sms-client, sms-online
- Language: PHP
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.transportsms_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'));
}
}
```