01.
$filename
=
'test.mp4'
;
02.
$filelocation
=
'../file/vdo/'
.
$filename
;
03.
04.
05.
header(
'Pragma: public'
);
06.
header(
'Expires: 0'
);
07.
header(
'Cache-Control: must-revalidate, post-check=0, pre-check=0'
);
08.
header(
'Last-Modified: '
.
gmdate
(
'D, d M Y H:i:s'
,
filemtime
(
$filelocation
)).
' GMT'
);
09.
header(
'Cache-Control: private'
,false);
10.
header(
'Content-Type: video/mp4'
);
11.
header(
'Content-Disposition: attachment; filename="'
.
basename
(
$filelocation
).
'"'
);
12.
header(
'Content-Transfer-Encoding: binary'
);
13.
header(
'Content-Length: '
.
filesize
(
$filelocation
));
14.
header(
'Connection: close'
);
15.
readfile(
$filelocation
);