https://github.com/bulkgate/sms
✉️ BulkGate SMS PHP SDK - The complete package for fast integration to PHP projects. Built-in support for Nette framework. Simplify your work. Integrate the SMS gateway quickly and easily into your PHP projects.
https://github.com/bulkgate/sms
bulkgate nette-framework php-sdk php7 sms sms-gateway
Last synced: 6 months ago
JSON representation
✉️ BulkGate SMS PHP SDK - The complete package for fast integration to PHP projects. Built-in support for Nette framework. Simplify your work. Integrate the SMS gateway quickly and easily into your PHP projects.
- Host: GitHub
- URL: https://github.com/bulkgate/sms
- Owner: BulkGate
- License: bsd-3-clause
- Archived: true
- Created: 2018-02-06T13:44:57.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-07-08T08:50:14.000Z (over 3 years ago)
- Last Synced: 2025-01-15T22:31:43.913Z (about 1 year ago)
- Topics: bulkgate, nette-framework, php-sdk, php7, sms, sms-gateway
- Language: PHP
- Homepage: https://www.bulkgate.com/en/developers/sms-api/
- Size: 70.3 KB
- Stars: 8
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
The SDK is outdated, please use it https://github.com/BulkGate/php-sdk
=============
BulkGate SMS - PHP SDK
=============
[](https://packagist.org/packages/bulkgate/sms)
[](https://github.com/bulkgate/sms/releases)
[](https://github.com/BulkGate/sms/blob/master/LICENSE)
- [Documentation](https://help.bulkgate.com/docs/en/php-sdk-instalation.html)
- [BulkGate portal](https://portal.bulkgate.com/)
- [BulkGate](https://www.bulkgate.com)
## Instalation
The easiest way to install [bulkgate/sms](https://packagist.org/packages/bulkgate/sms) into a project is by using [Composer](https://getcomposer.org/) via the command line.
```
composer require bulkgate/sms
```
If you have the package installed just plug in the autoloader.
``` php
require_once __DIR__ . '/vendor/autoload.php';
```
In order to send messages, you need an instance of the `BulkGate\Sms\Sender` class that requires instance dependency on the `BulkGate\Message\Connection` class.
``` php
$connection = new BulkGate\Message\Connection('APPLICATION_ID', 'APPLICATION_TOKEN');
$sender = new BulkGate\Sms\Sender($connection);
```
At this point, you are ready to send a message.
``` php
$message = new BulkGate\Sms\Message('447971700001', 'test message');
$sender->send($message);
```
The `send()` method will send a message `$message`.
## Nette framework
Register the extension to the DI container via NEON
``` neon
extensions:
bulkgate: BulkGate\Message\Bridges\MessageDI\MessageExtension
bulkgate:
application_id:
application_token:
```
which gives you the class [`BulkGate\Sms\Sender`](php-sdk-sender.md) as a service you can request.
``` php
sender->send(new BulkGate\Sms\Message('447971700001', 'test message'));
}
}
```
### Tracy
At the same time, you'll get the extension for [Tracy](https://tracy.nette.org) panel
