|
|
@@ -1,4 +1,7 @@
|
|
|
<?php
|
|
|
+
|
|
|
+require('inc/config.inc.php');
|
|
|
+require('inc/model.php');
|
|
|
/**
|
|
|
* Description of VideoStream
|
|
|
*
|
|
|
@@ -36,7 +39,9 @@ class VideoStream
|
|
|
private function setHeader()
|
|
|
{
|
|
|
ob_get_clean();
|
|
|
- header("Content-Type: video/mp4");
|
|
|
+ $splitted = explode('/', $this->path);
|
|
|
+ header("Content-Type: application/x-download");
|
|
|
+ header('Content-Disposition: attachment; filename="' . $splitted[sizeof($splitted) - 1] . '"');
|
|
|
header("Cache-Control: max-age=2592000, public");
|
|
|
header("Expires: ".gmdate('D, d M Y H:i:s', time()+2592000) . ' GMT');
|
|
|
header("Last-Modified: ".gmdate('D, d M Y H:i:s', @filemtime($this->path)) . ' GMT' );
|
|
|
@@ -126,5 +131,5 @@ class VideoStream
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-$stream = new VideoStream(base64_decode(urldecode($_GET['file'])));
|
|
|
+$stream = new VideoStream(Model::decryptText(base64_decode(urldecode($_GET['file']))));
|
|
|
$stream->start();
|