/** *This method returns an array of the attendees in the specified meeting. * *@param meetingID -- the unique meeting identifier used to store the meeting in the bigbluebutton server *@param modPW -- the moderator password of the meeting *@param URL -- the url of the bigbluebutton server *@param SALT -- the security salt of the bigbluebutton server * *@return * - Null if the server is unreachable. * - If FAILED, returns an array containing a returncode, messageKey, message. * - If SUCCESS, returns an array of array containing the userID, fullName, role of each attendee */ public function getUsersArray( $meetingID, $modPW, $URL, $SALT ) { $xml = bbb_wrap_simplexml_load_file( BigBlueButton::getMeetingInfoURL( $meetingID, $modPW, $URL, $SALT ) ); if( $xml && $xml->returncode == 'SUCCESS' && $xml->messageKey == null ) {//The meetings were returned return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); } else if($xml && $xml->returncode == 'SUCCESS'){ //If there were meetings already created foreach ($xml->attendees->attendee as $attendee){ $users[] = array( 'userID' => $attendee->userID, 'fullName' => $attendee->fullName, 'role' => $attendee->role ); } return $users; } else if( $xml ) { //If the xml packet returned failure it displays the message to the user return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); } else { //If the server is unreachable, then prompts the user of the necessary action return null; } }
//$joinURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?action=join&username='******'username']).'&meetingToken='.urlencode($_REQUEST['meetingToken']); if (BigBlueButton::isMeetingRunning($_REQUEST['meetingID'], $url, $salt)) { ?> <script language="javascript" type="text/javascript"> window.location.href="<?php echo $bbb_joinURL; ?> "; </script> <?php } else { /* * The meeting has not yet started, so check until we get back the status that the meeting is running */ $step = 4; $checkMeetingStatus = BigBlueButton::getMeetingInfoURL($_REQUEST['meetingID'], 'mp', $url, $salt); } } else { if (!$_REQUEST['username']) { $msg = "You must enter your name."; $step = 3; } } break; case 'isMeetingRunning': /* * This function proxy the request "isMeetingRunning" through PHP Script to BBB Server so we don't have any AJAX security issue */ ob_clean(); $checkMeetingStatus = BigBlueButton::isMeetingRunningURL($_REQUEST['meetingID'], $url, $salt); echo file_get_contents($checkMeetingStatus);