powered by Jive Software

XMPPHP question - how to set presence

Hi, this question is for anyone who knows about XMPPHP.

I am trying to set the presence of different users with the presence() function. It simply doesn’t work. I don’t get any errors either. Here’s my situation: I have GoogleTalk running on my desktop with a few users listed. I simply want to change the presence description of various users, within my php script. No matter what I do, the presence text will not change on GoogleTalk. There are no chatrooms or groups involved, just a bunch of users whose status I wish to change on their behalf.

This should be easy, right? I’ve tried the example code, and it just doesn’t do anything.

Here’s the code:

<?php include 'XMPPHP/XMPP.php'; $conn = new XMPPHP_XMPP('talk.google.com', 5222, 'fredbloggs@myplace.com', 'password', 'xmpphp', 'gmail.com', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO); $conn->connect(); $conn->processUntil('session_start'); $conn->presence("Ya, I am online"); ?>

Here’s what happens:

The onscreen status of fredbloggs remains unchanged, but when I try to chat with him manually (through GoogleTalk), it sort of lists the “Ya, I’m online” message in his chat window (but NOT in his status).

I’m stuck and I would really appreciate any pointers on this, as it’s becoming very urgent.

Thanks,

Owen

PS. (would appreciate if you could copy replies to owen dot southwood at x-on dot co dot uk, so I can get them straightaway, thanks!)