elithrin Posted August 2, 2012 Share Posted August 2, 2012 Hello everyone Sorry for my english :/Is there someone who possesses a php script for generate mumble viewer protocol in JSON (http://mumble.sourceforge.net/Channel_Viewer_Protocol#Server_format)?I have find http://gambler.orchitech.cz/test.htmt, but the code does not seem valid.Thanks ! Quote Link to comment Share on other sites More sharing options...
elithrin Posted August 2, 2012 Author Share Posted August 2, 2012 I have modify the script and now it's works !! function mapTree2Model($tree) { //print_r($tree->users); $channels = array(); for ($i = 0; $i < count($tree->children); $i++) { $channels[] = mapTree2Model($tree->children[$i]); } $users = array(); $user_detail = array(); for ($i = 0; $i < count($tree->users); $i++) { $user_detail = array( 'channel' => $tree->users[$i]->channel, 'deaf' => $tree->users[$i]->deaf, 'mute' => $tree->users[$i]->mute, 'name' => $tree->users[$i]->name, 'selfDeaf' => $tree->users[$i]->selfDeaf, 'selfMute' => $tree->users[$i]->selfMute, 'session' => $tree->users[$i]->session, 'suppress' => $tree->users[$i]->suppress, 'userid' => $tree->users[$i]->userid ); $users[] = $user_detail; } return array( 'description' => $tree->c->description, 'id' => $tree->c->id, 'links' => $tree->c->links, 'name' => $tree->c->name, 'parent' => $tree->c->parent, 'users' => $users, 'position' => $tree->c->position, 'channels' => $channels, 'temporary' => $tree->c->temporary ); } Quote Link to comment Share on other sites More sharing options...
Administrators kissaki Posted August 4, 2012 Administrators Share Posted August 4, 2012 Seehttp://mumble.sourceforge.net/Channel_Viewer_Protocol#Existing_Implementationslinking tohttp://mumble.sourceforge.net/3rd_Party_Applications#Channel_Viewers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.