[ejabberd] Retrieve avatar from ejabberd
melo at simplicidade.org
Wed Sep 5 20:12:03 MSD 2007
On Sep 5, 2007, at 3:49 PM, mitcheloc wrote:
> Hello all, How would I go about this:
> I'd like to retrieve the avatar for a jabber user from ejabberd and
> display it on a web page. Using an image tag such as:
> <img src="http://firstname.lastname@example.org />
> I'll probably need a php script to generate the image. I'm wondering
> specifically how to effeciently pull the data out of ejabberd?
> Ideally, I'd like to retrieve avatars for users on other domains (thus
> on xmpp servers not controlled by me) but I'll settle for just
> retreiving Avatars for local users.
What you can do is:
. create a component that receives a copy of each presence,
incoming and outgoing;
. look for the tell tale <x xmlns='vcard-
. if hash is not present in your local disk, fetch it with XEP-0054;
. associate JID from presence to hash of photo.
Things you need to have, and someone else might know how to get from
ejabberd: a copy of all your incoming and outgoing presences.
XMPP ID: melo at simplicidade.org
More information about the ejabberd