An open API service indexing awesome lists of open source software.

https://github.com/rrortega/sms-handler

Core for send & receive SMS using several methods!
https://github.com/rrortega/sms-handler

gateway message smpp sms

Last synced: 5 months ago
JSON representation

Core for send & receive SMS using several methods!

Awesome Lists containing this project

README

          

PHP-based SMS handler lib
=============

This is a SMS Handle lib for sending or receiving SMSs through sereral drivers

Using composser
-----
```
composer require rrortega/sms-handler
```

Basic usage example
-----

To send a SMS you can do:

``` php
[
"sender" => [
"class" => \rrortega\sms\core\Sender\SmppSender::class,
"conf" => [
"host" => "smpp.host.com",
"port" => 2875,
"user" => "smppuser",
"pass" => "smppasss",
"timeout" => 10000,
],
]
],
"twilio"=>[
"sender" => [
"class" => \rrortega\sms\core\Sender\TwilioSender::class,
"conf" => [
"sid" => "sid-xxxxxxxxx",
"token" => "token-xxxxxxxxxx
],
]
]
];

//using smpp
$handler = new \rrortega\sms\core\SmsHandler($configuration['smpp']);

//using twilio
$handler = new \rrortega\sms\core\SmsHandler($configuration['twilio']);

$m = $handler->sendSms("TEST SMPP", 521000000000, "Messaje sent using Smpp Driver");
$m->getStatus(); //SUCCESS or FAILED
$m->getId(); // message id