Created
May 31, 2020 15:56
-
-
Save leandroo/4fb089c99d7fb6c0a470b9e6875ca8a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
// Construct transport and client | |
$transport = new SocketTransport(array('127.0.0.1'),2775); | |
$transport->setRecvTimeout(60000); // for this example wait up to 60 seconds for data | |
$smpp = new SmppClient($transport); | |
// Activate binary hex-output of server interaction | |
$smpp->debug = true; | |
$transport->debug = true; | |
// Open the connection | |
$transport->open(); | |
$smpp->bindReceiver("user","pass"); | |
// Read SMS and output | |
$sms = $smpp->readSMS(); | |
echo "SMS:\n"; | |
var_dump($sms); | |
// Close connection | |
$smpp->close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment