Reputation: 433
Im using php to stream videos from my site , example of video url
http://site.com/videoplayback?pkey=04132122085611&hkey=802b48a81816d7686cb1e3bbb01f4b5c&fkey=04132122085611.flv&start=0
In this way i have protect and limit download speed, users IP and hiding real url path..
But when users with any download manager download video, title is always videoplayback for any file, here is screen what im mean https://i.sstatic.net/tp40W.png
how i can send title tag ? also videoplayback? is videoplayback.php in this file i have control to all...
and also this is header what i have in videoplayback.php
header('Pragma: public');
header("Content-length: " . filesize($getFsize));
if ($k4 == '.mp4') {
header('Content-Type: video/mp4');
} else {
header('Content-Type: video/x-flv');
}
header('Connection: Keep-Alive');
header('Proxy-Connection: Keep-Alive');
header('Accept-Ranges: bytes')
edit: Good example is youtube, yt have stream url in same way but send title to download menager...
Upvotes: 1
Views: 774
Reputation: 158060
Use the Content-Disposition
header to set the filename:
header('Content-Disposition: attachment; filename="' . $filename . '"');
Upvotes: 3