PHP Redirect file

При помощи PHP перенаправить выходной файл в клиентский браузер. Вернуть на запрос клиента файл.

<?php
$file = 'lcr.xlsx';
$file = $_GET['lcrname'];
 
if (file_exists($file)) {
    // redirect output to client browser 
    header('Content-Description: File Transfer');
    header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
    header('Content-Disposition: attachment; filename='.basename($file));
    header('Content-Transfer-Encoding: binary');
    header('Expires: 0');
    header('Cache-Control: must-revalidate');
    header('Pragma: public');
    header('Content-Length: ' . filesize($file));
    ob_clean();
    flush();
    readfile($file);
    unlink($file); //  удаляем файл
}   
 
?>
PQ VPS сервера в 28+ странах.