I'm trying to play videos on my site, but I want to hide the location of the video. I found a php script somewhere that has me do this:
$iFile = '/path/to/file.m4v'; header('Content-Type: video/x-m4v');
header('Content-Disposition: inline; filename="'.basename($iFile).'"');
header('Content-Length: '.filesize($iFile));
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
readfile($iFile);
And I found some javascript code that I put in the html portion of my page:
var myQTObject = new QTObject("http://someimage.jpg", "clickplay", "960", "555");
myQTObject.addParam("href", "link/to/phpscript.php");
myQTObject.addParam("target", "myself");
myQTObject.write();
When I run just the javascript and put the location of the actual file next to "href" everything works. But when I try to send the file via php, it no longer works. I'm using codeigniter to write the php script, if that makes a difference. Thanks!