In PHP, we can do something like
<?php
header("Location: https://www.example.com/test.exe");
?>
to download a file. However, the URL will be visible in a download manager such as DAP. So is there really a way to hide the download URL altogether?
//This will help you
<?php
$fullpath = 'https://www.example.com/test.exe';
$filename ='test.exe';
header("Cache-Control: public, must-revalidate");
header("Content-Type: application/exe");
header("Content-Length: " .(string)(filesize($fullpath)) );
header('Content-Disposition: attachment; filename="'.$filename.'"');
readfile($fullpath);
?>
MIME type informations