0

この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 でメッセージ「Bind Failed」を含む例外「SmppException」がキャッチされない SmppException: Bind Failed in /home/roman/www/ 621 行目の jobeet/php-smpp-master/smppclient.class.php コール スタック: 0.0007 345736 1. {main}() /home/roman/www/jobeet/index.php:0

私のコードにエラーがあるのでしょうか、それとも SMPP サーバーの問題でしょうか?

4

1 に答える 1

0

私の推測では、あなたの SMSC は送信機 + 受信機としての接続をサポートしておらず、残念ながらその特定のライブラリがサポートしていないトランシーバー接続のみを期待しています。

于 2013-06-02T10:32:23.663 に答える