So here is the script I have on a force download php, that downloads MP4s to the user:
ob_start();
header("Pragma: public");
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT");
header("Cache-Control: must-revalidate, post-check=3600, pre-check=18600");
header("Cache-Control: public", false);
header("Content-Description: File Transfer");
header("Content-Type: " . $type);
header("Accept-Ranges: bytes");
header("Content-Disposition: attachment; filename=\"". $filename .".". $extension ."\";");
header("Content-Transfer-Encoding: binary");
ob_end_clean();
readfile($file);
flush();
The file is located on another server I have, so it is remote. From what I've been told, this basically costs double the bandwidth, as the server this script is on now becomes a proxy. Is this true? And, if so, is there a way to do a remote download script without causing a proxy (stream direct from remote server to user).
Thanks
Ryan