PHPackages                             bulkgate/sms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. bulkgate/sms

Abandoned → [bulkgate/php-sdk](/?search=bulkgate%2Fphp-sdk)ArchivedLibrary[HTTP &amp; Networking](/categories/http)

bulkgate/sms
============

Simple PHP SDK for sending SMS via BulkGate portal. For credentials contact us.

2.1.1(4y ago)898.6k↑18.9%3[2 issues](https://github.com/BulkGate/sms/issues)BSD-3-ClausePHPPHP &gt;=7.1.0

Since Feb 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/BulkGate/sms)[ Packagist](https://packagist.org/packages/bulkgate/sms)[ Docs](https://www.bulkgate.com)[ RSS](/packages/bulkgate-sms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (15)Used By (0)

The SDK is outdated, please use it
========================================================================

[](#the-sdk-is-outdated-please-use-it-httpsgithubcombulkgatephp-sdk)

BulkGate SMS - PHP SDK
======================

[](#bulkgate-sms---php-sdk)

[![Downloads](https://camo.githubusercontent.com/654a9a833e578b7d0dd1a90a608448b0f7e01bb8dd8ab3558e51262e72c6488b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62756c6b676174652f736d732e737667)](https://packagist.org/packages/bulkgate/sms)[![Latest Stable Version](https://camo.githubusercontent.com/019472286a9856030e3bfd9d4f8bfd781799ac463732abdf36b25c7bc126f59f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62756c6b676174652f736d732e737667)](https://github.com/bulkgate/sms/releases)[![License](https://camo.githubusercontent.com/94d6a1ddc2e494501bee78ba4445d972251a4a36389b72a2d1cc7d91284b802c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f62756c6b676174652f736d732e737667)](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
-----------

[](#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.

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

```
$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.

```
$message = new BulkGate\Sms\Message('447971700001', 'test message');

$sender->send($message);
```

The `send()` method will send a message `$message`.

Nette framework
---------------

[](#nette-framework)

Register the extension to the DI container via 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.

```
