PHP Implementation for sending SMS through SMPP Protocol.
Your support allows me to keep this package free, up-to-date and maintainable. Alternatively, you can spread the word!
You can install the package via composer:
composer require jagdish-j-p/smpp-php
- Send SMS
use JagdishJP\SmppPhp\Smpp;
$smpp = new Smpp('localhost',2775, true, true);
$smpp->bindTransmitter('SENDERID', 'USERNAME', 'PASSWORD');
$response = $smpp->sendSms('recepient number', 'Message');
$smpp->close();
- Read SMS
use JagdishJP\SmppPhp\Smpp;
$smpp = new Smpp('localhost',2775, true, true);
$smpp->bindReceiver('SENDERID', 'USERNAME', 'PASSWORD');
$message = $smpp->readSms();
$smpp->close();
- Send and Read SMS
use JagdishJP\SmppPhp\Smpp;
$smpp = new Smpp('localhost',2775, true, true);
$smpp->bindTransreceiver('SENDERID', 'USERNAME', 'PASSWORD');
$response = $smpp->sendSms('recepient number', 'Message');
$message = $smpp->readSms();
$smpp->close();