【发布时间】:2010-12-02 17:59:13
【问题描述】:
<?php
include("XMPP.php");
$conn = new XMPPHP_XMPP('server.com', 5222, 'user', 'pass', 'home');
$conn->useEncryption(true);
$conn->connect();
$conn->processUntil('session_start');
$conn->message('person@server.com', mktime());
$payloads = $conn->processUntil('message');
$conn->message('person@server.com', mktime());
$conn->disconnect();
?>
正确...所以它连接 - 它启动会话并发送在我正在使用的 jabber 客户端上接收到的第一个时间戳。
然后它应该“处理直到”收到一条消息(afaik),如果收到一条消息,则发送另一个时间戳。嗯,这个位是行不通的位。
我没有 XMPP 服务器或 XMPPHP 的先验知识,所以所有的帮助,无论多么基础,都不会被忽视! :)
谢谢。
【问题讨论】:
-
尝试传入
new XMPPHP_XMPHP的最后几个日志记录选项,即$xmpphp = new XMPPHP_XMPP( $server_settings["address"], 5222, $xmpp_settings["username"], $xmpp_settings["password"], $resource, NULL, TRUE, XMPPHP_Log::LEVEL_VERBOSE ); -
这只是给了我一大页信息,对我没有帮助:p
-
我不知道为什么你不能让这个简单的应用程序与 xmpphp 库一起工作......但是,如果你仍在寻找解决方案,请直接联系库作者,否则请尝试 PHP 中的其他 xmpp 库,例如Jaxl 库github.com/abhinavsingh/JAXL