0
votes

I'm writing a chat app for ios, i have a local installation of ejabberd server, the xmppframework on my xcode project and the xmpphp framework on a web server. I simply need to know how i can retrive the list of all active user in my server? How i can do? I'm already able to send message beetween two specific users, i'm able to register and delete user by php, but i can't find a piece of code that explain me how can i retrive the list of the online users... I have already setted a shared roster on the ejabberd server like this link explain:http://www.ejabberd.im/shared-roster-all (example 1)

Maybe my solution is XEP-0133 ? I have found this on documentation:

<iq from='[email protected]/globe'
id='get-active-users-1'
to='shakespeare.lit'
type='set'
xml:lang='en'>
 <command xmlns='http://jabber.org/protocol/commands' 
       action='execute'
       node='http://jabber.org/protocol/admin#get-active-users'/>
</iq>

It seems to extract all the active users,anyway i don't know how i can send to the server this xml through php. So my questions are;

How i can retrive through php the list of the active users on my ejabberd server? How i can retrive the presence (if is online) o a specified user?

1

1 Answers

0
votes

do you want to retrieve data for your self or do you want to make it part of operations?

ejabberd has web interface with bunch of data, but I do not have one around to check.

When I need to do the adhoc query I look at session table. It holds all active sessions. Where do you keep session? In mnesia?

Here is the link to web interface: http://www.ejabberd.im/files/doc/guide.html#htoc20