PHPackages                             nanoblocktech/php-sms-gateways - 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. nanoblocktech/php-sms-gateways

ActiveLibrary[HTTP &amp; Networking](/categories/http)

nanoblocktech/php-sms-gateways
==============================

PHP class for sms gateways, using same codebase implementaion to send sms in different sms gateways.

1.1(2y ago)122MITPHP ^8.0

Since Dec 25Compare

[ Source](https://github.com/nanoblocktech/php-sms-gateways)[ Packagist](https://packagist.org/packages/nanoblocktech/php-sms-gateways)[ RSS](/packages/nanoblocktech-php-sms-gateways/feed)WikiDiscussions Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP SMS GATEWAYS
----------------

[](#php-sms-gateways)

PHP class for sms gateways, using same codebase and implementation to send sms in Vonage &amp; ClickSend sms gateways.

### AVAILABLE SMS PROVIDERS

[](#available-sms-providers)

- Vonage: To use Vonage as provider, install the library `composer require vonage/client`
- ClickSend To use ClickSend as provider, install the library `composer require clicksend/clicksend-php`

Installation Guide via Composer:

```
composer require nanoblocktech/php-sms-gateways
```

### Usages

[](#usages)

Initialize classes

```
use \Luminova\ExtraUtils\Sms\Gateway;
use \Luminova\ExtraUtils\Sms\Providers\Vonage;
use \Luminova\ExtraUtils\Sms\Providers\ClickSend;
use \Luminova\ExtraUtils\Sms\Exceptions\SmsException;
```

Initialize SMS Client using `Vonage`

```
use Luminova\ExtraUtils\Sms\Providers\Vonage;

$client = new Vonage("KEY", "SECRETE");
```

Initialize SMS Client using `ClickSend`

```
use Luminova\ExtraUtils\Sms\Providers\ClickSend;

$client = new ClickSend("USERNAME", "KEY");
```

Initialize SMS gateway

```
$gateway = new Gateway($client);

$gateway->setPhone('000000000');
$gateway->setFrom('000000000');
$gateway->setMessage('Hello your verification code is 1234');
try {
    if($gateway->send()){
        echo "Message sent successfully";
    }else{
        $response = $gateway->getResponse();
        echo $response->getError();
    }
} catch (SmsException $e){
    echo $e->getMessage();
}
```

Send sms using modem serial port

```
use Luminova\ExtraUtils\Sms\SerialGateway;
try{
    $serial = new SerialGateway('COM4', 'en_US');
    $serial->send('000000000', 'Hello your verification code is 1234', function($data){
        echo "Message sent successfully";
    });
} catch (SmsException $e){
    echo $e->getMessage();
}
```

Configuring your serial

```
use Luminova\ExtraUtils\Sms\SerialGateway;
$to = '9999999999';
$message = 'Hello your verification code is 1234';

try{
    $serial = new SerialGateway('COM4', 'en_US');
    $serial->setBaudRate(9600);
    $serial->setParity('none');
    $serial->setCharacterLength(8);
    $serial->setStopBits(1);
    $serial->setFlowControl('none');
    if($serial->openDevice()){
        $serial->sendMessage("AT+CMGF=1\n\r");
        $serial->sendMessage("AT+cmgs=\"{$to}\"\n\r");
        $serial->sendMessage("{$message}\n\r");
        $serial->sendMessage(chr(26));

        sleep(7);

        $read = $serial->readPort(0);
        $serial->closeDevice();
        echo "Message was sent successfully";
    }
} catch (SmsException $e){
    echo $e->getMessage();
}
```

Response methods

```
 $response = $gateway->getResponse();

/**
 * Get response status
*/
$response->getStatus();

/**
 * Get gateways response status
*/
$response->getOriginalStatus();

/**
 * Check if sms message was sent
*/
$response->isSuccess();

/**
 * Get api response body
*/
$response->getContent();

/**
 * Get error if any
*/
$response->getError();
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

920d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce34af529a4ed50696211a2b4d330fbadd2d1738bc5d010523eb4a85cf342b17?d=identicon)[peterujah](/maintainers/peterujah)

---

Top Contributors

[![peterujah](https://avatars.githubusercontent.com/u/16369609?v=4)](https://github.com/peterujah "peterujah (9 commits)")

---

Tags

phpsmsvonagesms-gatewayClickSendluminovamultiple sms gateways

### Embed Badge

![Health badge](/badges/nanoblocktech-php-sms-gateways/health.svg)

```
[![Health](https://phpackages.com/badges/nanoblocktech-php-sms-gateways/health.svg)](https://phpackages.com/packages/nanoblocktech-php-sms-gateways)
```

###  Alternatives

[infobip/infobip-api-php-client

PHP library for consuming Infobip's API

961.9M10](/packages/infobip-infobip-api-php-client)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4640.8k](/packages/ismaeltoe-osms)[ender/yunpian-sms

A php SDK for yunpian(云片网络短信服务商) sms RESTFULL API

294.9k](/packages/ender-yunpian-sms)[openapi/openapi-sdk

Minimal and agnostic PHP SDK for Openapi® (https://openapi.com)

171.4k1](/packages/openapi-openapi-sdk)

PHPackages © 2026

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