Source for file audiopost.php
Documentation is available at audiopost.php
//file_put_contents("result.txt", print_r($_POST, true));
//file_put_contents("result3.txt", print_r($_FILES, true));
//file_put_contents("result2.txt", print_r($_GET, true));
require ('../inc/global.inc.php');
// check the request comes from our red5 server
if ($_FILES["file"]["size"] == 0)
//get 255 range for known server address
$ip_range_server = $split[0]. '.'. $split[1]. '.'. $split[2];
//get 255 range for request source address
$split = split('.',$_SERVER['REMOTE_ADDR']);
$ip_range_request = $split[0]. '.'. $split[1]. '.'. $split[2];
if($ip_range_server == $ip_range_request){$is_our_server = true;}
$string1 = $_GET['course_code']. $_GET['user_id']. gmdate('Ymd'). $_configuration['security_key'];
$string2 = $_GET['course_code']. $_GET['user_id']. (gmdate('Ymd')- 1). $_configuration['security_key'];
if(md5($string1) == $_GET['checker'] or md5($string2) == $_GET['checker'])
$basename = basename( $_FILES['file']['name']);
$target = $target . $basename ;
error_log(__FILE__. ':'.__LINE__. ': File upload to '. $target. ' failed',0);
require_once(api_get_path(LIBRARY_PATH). 'fileUpload.lib.php');
error_log(__FILE__. ':'.__LINE__. ': Something went wrong with item properties update of '. $target,0);
//$res = api_item_property_update($course_info,TOOL_DOCUMENT,$id,'invisible',$_GET['user_id']);
error_log(__FILE__. ':'.__LINE__. ': Could not create document record for document '. $target,0);
error_log(__FILE__. ':'.__LINE__. ': Attempting to save file but hash check did not suceed (hacking attempt?)',0);
error_log(__FILE__. ':'.__LINE__. ': Attempting to save file but videoconf is not enabled',0);
error_log(__FILE__. ':'.__LINE__. ': Attempting to save file but coming from unknown source',0);
|