【发布时间】:2013-06-01 13:53:07
【问题描述】:
我使用this SMPP 库。这是我的代码:
$transport = new SocketTransport(array($smpphost),$smppport,false,'printDebug'); // hostname/ip (ie. localhost) and port (ie. 2775)
$transport->setRecvTimeout(10000);
$transport->setSendTimeout(10000);
$smpp = new SmppClient($transport,'printDebug');
// Activate debug of server interaction
$smpp->debug = true; // binary hex-output
$transport->debug = true; // also get TSocket debug
// Open the connection
$transport->open();
$smpp->bindTransmitter($systemid,$password);
// Prepare message
$message = 'H€llo world';
$encodedMessage = GsmEncoder::utf8_to_gsm0338($message);
$from = new SmppAddress(GsmEncoder::utf8_to_gsm0338('SMPP Tést'),SMPP::TON_ALPHANUMERIC);
$to = new SmppAddress($too,SMPP::TON_INTERNATIONAL,SMPP::NPI_E164);
// Send
$smpp->sendSMS($from,$to,$encodedMessage);
// Close connection
$smpp->close();
我得到的错误是:
致命错误:第 621 行的 /home/roman/www/jobeet/php-smpp-master/smppclient.class.php 中未捕获的异常“SmppException”和消息“绑定失败” SmppException:/home/roman 中的绑定失败/www/jobeet/php-smpp-master/smppclient.class.php 在第 621 行调用堆栈:0.0007 345736 1. {main}() /home/roman/www/jobeet/index.php:0
我的代码中可能有错误还是只是 SMPP 服务器问题?
【问题讨论】: