4 * http://opencaps.atrc.utoronto.ca
6 * Copyright 2010 Heidi Hazelton
7 * Adaptive Technology Resource Centre, University of Toronto
9 * Licensed under the Educational Community License (ECL), Version 2.0.
10 * You may not use this file except in compliance with this License.
11 * http://www.opensource.org/licenses/ecl2.php
15 define('INCLUDE_PATH', 'include/');
17 require(INCLUDE_PATH.'vitals.inc.php');
22 if (isset($_SESSION['rid'])) {
23 $uri = explode($remote_systems[$_SESSION["rid"]]['url'], $file);
25 $file = matterhornAuth($_SESSION["rid"], $uri, "media");
28 header('Pragma: public');
30 header('Cache-Control: must-revalidate, post-check=0, pre-check');
31 header('Cache-Control: private', false);
32 header('Content-Type: video/quicktime');
33 header('Content-Transfer-Encoding: binary');
34 header('Content-Length: '.filesize($file));
49 loadMedia(urldecode($_GET['loc']));
51 function loadMedia($loc) {
52 global $remote_systems;
55 if (isset($_SESSION["rid"])) {
56 $uri = explode($remote_systems[$_SESSION["rid"]]['url'], $loc);
58 return matterhornAuth($rid, $uri, "media");
61 return readfile($loc);