1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
require_once 'smppclient.class.php';
require_once 'gsmencoder.class.php';
require_once 'sockettransport.class.php';
// Construct transport and client
$transport = new SocketTransport(array('x.xx.xx.xxx'),xxxx);
$transport->setRecvTimeout(1000);
$smpp = new SmppClient($transport);
// Activate binary hex-output of server interaction
$smpp->debug = true;
$transport->debug = true;
// Open the connection
$smpp->bindTransmitter("xxxx","xxxx");
$transport->open();
// Prepare message
$message = 'Hllo world';
$encodedMessage = GsmEncoder::utf8_to_gsm0338($message);
$from = new SmppAddress('SMPP Test',SMPP::TON_ALPHANUMERIC);
$to = new SmppAddress(xxxxxxxxxxx,SMPP::TON_INTERNATIONAL,SMPP::NPI_E164); |
Partager