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!
- Host: GitHub
- URL: https://github.com/rrortega/sms-handler
- Owner: rrortega
- Created: 2017-12-30T02:41:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-18T20:44:53.000Z (almost 8 years ago)
- Last Synced: 2023-05-23T10:26:33.797Z (about 3 years ago)
- Topics: gateway, message, smpp, sms
- Language: PHP
- Size: 29.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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