次のコードを実行すると、エラーが発生します (致命的なエラー: 123 行目の E:\wamp\www\chat\vendor\abhinavsingh\jaxl\xep\xep_0206.php で最大実行時間が 30 秒を超えました)。しかし、行をコメントアウトすると ( 'bosh_url' => ' http://test.com:7070/http-bind ',)、問題ないようです。誰が何が悪いのか教えてもらえますか?
<?php
require_once __DIR__ . '/vendor/autoload.php';
$client = new JAXL(array(
'jid' => 'devin@localhost',
'pass' => 'like',
'bosh_url' => 'http://test.com:7070/http-bind',
'log_path' => __DIR__ . '/logs',
'log_level' => JAXL_INFO,
'strict' => false,
));
$client->add_cb('on_auth_success', function() {
global $client;
echo 'on_auth_success', '<br/>';
$client->set_status("available!"); // set your status
//$client->get_vcard(); // fetch your vcard
//$client->get_roster(); // fetch your roster list
});
/*$client->add_cb('on_chat_message', function($msg) {
global $client;
echo 'on_chat_message', '<br/>';
// echo back
$msg->to = $msg->from;
$msg->from = $client->full_jid->to_string();
$client->send($msg);
});
$client->add_cb('on_disconnect', function() {
_debug("got on_disconnect cb");
});
*/
$client->start();