/** *This method calls isMeetingRunning on the BigBlueButton server. * *@param meetingID -- the unique meeting identifier used to store the meeting in the bigbluebutton server *@param SALT -- the security salt of the bigbluebutton server *@param URL -- the url of the bigbluebutton server * *@return * - If SUCCESS it returns an xml packet * - If the FAILED or the server is unreachable returns a string of 'false' */ public function getMeetingXML( $meetingID, $URL, $SALT ) { $xml = bbb_wrap_simplexml_load_file( BigBlueButton::isMeetingRunningURL( $meetingID, $URL, $SALT ) ); if( $xml && $xml->returncode == 'SUCCESS') return ( str_replace('</response>', '', str_replace("<?xml version=\"1.0\"?>\n<response>", '', $xml->asXML()))); else return 'false'; }
} else { ?> <!-- primeira exibição da página --> <h2>Criar sala de conferência</h2> <form method="post"> <p>Informe seu login (ex.: fulano.silva): <input type="text" name="criador"/></p> <p>Nome da sala: <input type="text" name="sala"/></p> Logins dos convidados (ex.: fulano.silva):<ul> <? for($i = 1; $i <= 8; ++$i) { ?> <li><?=$i?> <input type="text" name="convidado_<?=$i?>"/> <label><input type="checkbox" name="mod_<?=$i?>"/> moderador</label></li> <? } ?> </ul> <input type="submit" value="Criar sala"/> </form> <hr/> Salas atualmente abertas:<ul> <?php $ret = bbb_wrap_simplexml_load_file(BigBlueButton::getMeetingsURL($url, $salt)); if(!count($ret->meetings->meeting)) echo '<li><i>(nenhuma)</i></li>'; else foreach($ret->meetings->meeting as $meeting) echo '<li>'.$meeting->meetingID.'</li>'; ?> </ul> <? } ?> </body> </html>
function getMeetings() { $xml = bbb_wrap_simplexml_load_file(getURLMeetings()); if ($xml && $xml->returncode == 'SUCCESS') { if ($xml->messageKey) return ($xml->message->asXML()); ob_start(); echo '<meetings>'; if (count($xml->meetings) && count($xml->meetings->meeting)) { foreach ($xml->meetings->meeting as $meeting) { echo '<meeting>'; echo getMeetingInfo($meeting->meetingID, $meeting->moderatorPW); echo '</meeting>'; } } echo '</meetings>'; return (ob_get_clean()); } else return (false); }
public function getMeetingIsActive($meetingID, $modPW, $URL, $SALT) { $xml = bbb_wrap_simplexml_load_file(Webconference_Backend_BigBlueButtonApi::getMeetingInfoURL($meetingID, $modPW, $URL, $SALT)); if ($xml && $xml->returncode == 'SUCCESS' && !$xml->messageKey == null && $xml->hasBeenForciblyEnded == 'false') { //The meetings were returned return true; } else { return false; } }
(at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Versions: 0.1 -- Initial version written by Omar Shammas (email : omar DOT shammas [a t ] g m ail DOT com) */ //================================================================================ //------------------Required Libraries and Global Variables----------------------- //================================================================================ require 'bbb_api.php'; //================================================================================ //------------------------------------Main---------------------------------------- //================================================================================ echo '<?xml version="1.0"?>' . "\r\n"; $meetingID = $_GET['meetingID']; //Calls ismeetingrunning and returns returns the result $xml = bbb_wrap_simplexml_load_file($meetingID); if ($xml && ($xml->returncode == 'SUCCESS' || $xml->returncode == 'FAILED')) { echo str_replace('</response>', '', str_replace("<?xml version=\"1.0\"?>\n<response>", '', $xml->asXML())); } else { echo 'false'; }