Hi Daryl,
I modified my code as you told but I still can not send a message to a chat room. This is my code after modified:
$conn = new XMPPHP_XMPP('my_server_name', 5222, 'username', 'password', 'xmpphp', 'my_server_name', $printlog = true, $loglevel = XMPPHP_Log::LEVEL_INFO);
$conn->connect();
$conn->processUntil('session_start');
$conn->presence(NULL, "available", "testchatroom@conference.my_server_name/username");
$conn->message('testchatroom@conference.my_server_name', 'Test message!', 'groupchat');
$conn->presence(NULL, "unavailable", "testchatroom@conference.my_server_name/username");
$conn->disconnect();
testchatroom@conference.my_server_name have some people here.
I also saw the link you gave me. But in that link, Trillomedia S.r.l. also have a problem like me. He and I also send a message to a specific user successfully but when send to a chat room, it did not work.
Do we need to configure something of chat room in Openfire Admin Console? Please help me about this if you have any idea. Currently, I have no clue to continue.
Thank you Daryl for your reply.