Php File Size header() -
$file_name = $_get['name']; $file_url = $_get['file-url'] . $file_name; header('content-type: application/octet-stream'); header("content-transfer-encoding: binary"); header("content-disposition: attachment; filename=\"".$file_name."\""); readfile($file_url); exit; i'm using code download files in site fetching web servers.
it works if url looks this:-
https://www.example.com/file_download.php?name=video_song.mp4&file-url=http://www.googlevideo.com/video/play/221589 so, starts downloading fetching file http://www.googlevideo.com/video/play/221589 in site. now, though downloads file correctly, allow downloader see actual size of file. so, downloaders having problems (e.g. time remaining, download percentage etc.).
so header should use solve thing? please explain coding.
you may try this:
header("content-length: " . $filesize);
Comments
Post a Comment