dev-master
9999999-devSms Handlers
MIT
The Requires
- php >=5.3.3
- ext-sockets *
- ext-mbstring *
- ext-gmp *
The Development Requires
by Rolando Rodriguez Ortega
framework sms
Sms Handlers
This is a SMS Handle lib for sending or receiving SMSs through sereral drivers, (*1)
composer require rrortega/sms-handler
To send a SMS you can do:, (*2)
``` php <?php, (*3)
require_once "vendor/autoload.php";, (*4)
$configuration=[
"smpp"=>[
"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
],
]
]
];, (*5)
//using smpp $handler = new \rrortega\sms\core\SmsHandler($configuration['smpp']);, (*6)
//using twilio $handler = new \rrortega\sms\core\SmsHandler($configuration['twilio']);, (*7)
$m = $handler->sendSms("TEST SMPP", 521000000000, "Messaje sent using Smpp Driver"); $m->getStatus(); //SUCCESS or FAILED $m->getId(); // message id, (*8)
Sms Handlers
MIT
framework sms