Hello, I have the code below for forcing and renaming media files to mp4 via remote URL download with all the download being corrupted as you are not downloading properly. How can I fix this because the file when downloading is getting 2kbs in size.
$file = 'http://thumb.mais.uol.com.br/15328248.mp4';
$nome = 'novoNome.mp4';
header("Content-Description: File Transfer");
header("Content-Type: video/mp4");
header('Content-Disposition: attachment; filename="' . ($nome) . '";');
header('Content-Length: ' . strlen(file_get_contents($file)));
readfile($file);