2012-06-05 11:42
浏览 108


I have a OpenFire server running (it is using MySQL as it's database) and I'm trying to make a PHP http pre-bind system(using SASL) work with my web app.

I have got to a part of my app where I need to choose a random username that is not already online(for guest users). I was thinking of choosing some random users(in the Guests group I've created) and using the Presence Service plugin to check their online status until I find an available one(a user that's offline).

Is there a better way to get a list of offline/online users?

Does the server store the online status of users in the db? I've been looking around the OpenFire db but I can't figure it out.


图片转代码服务由CSDN问答提供 功能建议

我有一个运行的OpenFire服务器(它使用MySQL作为它的数据库)而我正在尝试创建一个PHP http预绑定系统(使用SASL)可与我的网络应用程序一起使用。

我需要选择一个尚未在线的随机用户名的应用程序的一部分(用于 来宾用户)。 我在考虑选择一些随机用户(在我创建的Guests组中)并使用Presence Service插件检查他们的在线状态,直到找到可用的用户(离线的用户)。


服务器是否存储数据库中用户的在线状态? 我一直在寻找OpenFire数据库,但我无法理解。


  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • du9537 2012-06-05 12:12

    I wrote a small plugin for Openfire (with help of some other really simple plugin that I could plug without having to dig through the Openfire API docs) which basically spits out a JSON encoded list of users online. I could then just grab this and run json_decode and cycle through the array. I can't find the source at the moment, but it seems someone else made this aswell:


    I notice the Github project linked to in the above post is now gone, but I would try contacting them and see if they still have it.


    Link to the Github repo:

    解决 无用
    打赏 举报
  • 查看更多回答(1条)

相关推荐 更多相似问题