PHPackages                             anlutro/bulk-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. [API Development](/categories/api)
4. /
5. anlutro/bulk-sms

ActiveLibrary[API Development](/categories/api)

anlutro/bulk-sms
================

BulkSMS API implementation in PHP.

2.2.0(4y ago)3826.8k↓12.5%25[1 PRs](https://github.com/anlutro/php-bulk-sms/pulls)MITPHPPHP &gt;=5.4.0CI failing

Since Sep 26Pushed 4y ago4 watchersCompare

[ Source](https://github.com/anlutro/php-bulk-sms)[ Packagist](https://packagist.org/packages/anlutro/bulk-sms)[ RSS](/packages/anlutro-bulk-sms/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (16)Used By (0)

BulkSMS API - PHP implementation
================================

[](#bulksms-api---php-implementation)

A simple implementation of BulkSMS for PHP.

Includes functionality to send single or batch messages.

Installation
------------

[](#installation)

This package requires PHP 5.4 because I'm too lazy to type `array()`. Sorry.

Using composer: `composer require anlutro/bulk-sms` - list of versions is available through GitHub's tag list.

### Laravel

[](#laravel)

The package includes files to make usage super easy in Laravel 4 and higher.

1. Add `anlutro\BulkSms\Laravel\BulkSmsServiceProvider` to the list of providers in `app/config/app.php`.
2. Run `php artisan config:publish anlutro/bulk-sms`. Edit the config file in `app/config/packages/anlutro/bulk-sms` and fill in your username and password.
3. (optional) Add an alias for the facade by adding `'BulkSms' => 'anlutro\BulkSms\Laravel\BulkSms'` to aliases in `app/config/app.php`.

Credentials
-----------

[](#credentials)

To use this library you need create an account with Bulksms. They support several sub-sites for specific regions.

1. Username : Bulksms login
2. Password : Bulksms login password
3. Baseurl : Bulksms sub-site to connect to (e.g. '' or '')

Usage
-----

[](#usage)

Send a single message:

```
$bulkSms = new anlutro\BulkSms\BulkSmsService('username', 'password', 'baseurl');
$bulkSms->sendMessage('12345678', 'Hello there!');
```

Send more than one message at the same time by providing an array of messages:

```
$message1 = new \anlutro\BulkSms\Message('12345678', 'Hi there');
$message2 = new \anlutro\BulkSms\Message('12345678', 'Hello again');
$bulkSms = new anlutro\BulkSms\BulkSmsService('username', 'password', 'baseurl');
$bulkSms->sendMessage(array($message1,$message2));
```

Get the status of a batch of messages:

```
$bulkSms = new anlutro\BulkSms\BulkSmsService('username', 'password', 'baseurl');
$bulkSms->getStatusForBatchId(693099785);
```

Sending unicode messages
------------------------

[](#sending-unicode-messages)

In order to send unicode messages, make sure your message is UTF-16, convert them to hexadecimal, and specify the 'dca' parameter:

```
$text = 'السلام عليكم';
$encodedMessage = bin2hex(mb_convert_encoding($text, 'utf-16', 'utf-8')) ;
$bulkSms->sendMessage('12345678', $encodedMessage, ['dca' => '16bit']);
```

Send test messages
------------------

[](#send-test-messages)

BulkSms suports test modes (SUCCESS and FAIL) that validate the message and return defined responses without really sending out SMS. In order to send messages in test mode, run the following:

Send message that will return a success:

```
$bulkSms = new anlutro\BulkSms\BulkSmsService('username', 'password', 'baseurl');
$bulkSms->setTestMode(\anlutro\BulkSms\BulkSmsService::TEST_ALWAYS_SUCCEED);
$bulkSms->getStatusForBatchId(693099785);
```

Send message that will return a failure response - and thus trigger a BulkSmsException :

```
$bulkSms = new anlutro\BulkSms\BulkSmsService('username', 'password', 'baseurl');
$bulkSms->setTestMode(\anlutro\BulkSms\BulkSmsService::TEST_ALWAYS_FAIL);
$bulkSms->getStatusForBatchId(693099785);
```

In Laravel, you don't need to construct `$bulkSms`, and you can replace `$bulkSms->` with `BulkSms::` provided you followed the installation steps above.

Contact
=======

[](#contact)

Open an issue on GitHub if you have any problems or suggestions.

License
=======

[](#license)

The contents of this repository is released under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 57.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~284 days

Recently: every ~562 days

Total

11

Last Release

1760d ago

Major Versions

1.2.0 → 2.0.02015-05-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/48f62855097c02888b96494da9a389988cd7ecb9001465f8ec30f15672fb5b5a?d=identicon)[anlutro](/maintainers/anlutro)

---

Top Contributors

[![anlutro](https://avatars.githubusercontent.com/u/163093?v=4)](https://github.com/anlutro "anlutro (38 commits)")[![gawonmi](https://avatars.githubusercontent.com/u/4547336?v=4)](https://github.com/gawonmi "gawonmi (27 commits)")[![jedimdan](https://avatars.githubusercontent.com/u/757825?v=4)](https://github.com/jedimdan "jedimdan (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/anlutro-bulk-sms/health.svg)

```
[![Health](https://phpackages.com/badges/anlutro-bulk-sms/health.svg)](https://phpackages.com/packages/anlutro-bulk-sms)
```

###  Alternatives

[lanlin/nylas-php

Nylas PHP SDK (api version 2.7)

28258.7k](/packages/lanlin-nylas-php)[multinexo/php-afip-ws

Librería PHP para interactuar con el webservice de AFIP (Argentina -&gt; factura electrónica).

229.9k](/packages/multinexo-php-afip-ws)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
