-
-
Save karson/e058921969cb124f18c9e4455d2e8d6e 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