Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 8 hours 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-08T08:50:14.000Z (about 2 years ago)
- Last Synced: 2024-09-27T05:41:42.823Z (about 8 hours 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
=============[![Downloads](https://img.shields.io/packagist/dt/bulkgate/sms.svg)](https://packagist.org/packages/bulkgate/sms)
[![Latest Stable Version](https://img.shields.io/github/release/bulkgate/sms.svg)](https://github.com/bulkgate/sms/releases)
[![License](https://img.shields.io/github/license/bulkgate/sms.svg)](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\MessageExtensionbulkgate:
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
![bulkgate-sdk-tracy](https://github.com/BulkGate/help/raw/master/website/static/img/sdk-tracy.png)