我想在 jaxl 中发送消息后执行一些代码。哪种回调适合这种情况?
public function test() {
require_once 'JAXL/jaxl.php';
global $client;
$client = new JAXL(array(
'jid' => 'user@localhost',
'pass' => 'password',
'log_level' => JAXL_INFO
));
$client->add_cb('on_stream_features', function($stanza) {
global $client,$thisObj;
$client->send_chat_msg('otherUser@localhost','Message');
});
$client->add_cb('on_message_send',function(){ //some thing like this
//some code
});
}