Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 12162

Re: Broadcast message using Openfire

$
0
0

Hi Dary/ ashish l, now I can send the message to the single user .but i am unable to send message to group,

 

 

conn = new XMPPHP_XMPP('my_server, 'username', 'password', 'xmpphp', 'myserver', $printlog=true, $loglevel=XMPPHP_Log::LEVEL_INFO);

var_dump($conn);

$conn->connect();

$conn->processUntil('session_start');

$conn->message('jeeva@myserver, 'This is a  momday single chat  message!','chat');

$conn->disconnect();

 

This above cod working successfully for single chat.

 

$conn = new XMPPHP_XMPP('my_server, 5222, 'username', 'passwors', 'xmpphp', 'my_server, , $printlog = true, $loglevel = XMPPHP_Log::LEVEL_INFO);

var_dump($conn);

$conn -> connect();

$conn -> processUntil('session_start');

$conn -> presence(NULL, "available", "hobbies@conference.my_server, /admin");

$conn -> message('hobbies@conference.my_server', 'Tis is group chat!', 'groupchat');

sleep(60);

$conn -> presence(NULL, "unavailable", "hobbies@my_server, .tenet.res.in/admin");

$conn -> disconnect();

 

Here i am using above code for group chat,but its not sending any message ,

 

Kindly do the need full.



Viewing all articles
Browse latest Browse all 12162

Trending Articles