jagdish-j-p/smpp-php

PHP Implementation of SMPP protocol to send sms.

v1.0.0 2023-02-04 07:23 UTC

This package is auto-updated.

Last update: 2024-12-04 09:37:00 UTC


README

PHP Implementation for sending SMS through SMPP Protocol.

Become a sponsor

Your support allows me to keep this package free, up-to-date and maintainable. Alternatively, you can spread the word!

Installation

You can install the package via composer:

composer require jagdish-j-p/smpp-php

Usage

  • 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();