thanks toweter. but, how do i have like a link for them to download? if i use your script above, it will automatically open in the webpage, and not download it.
Wizard, could you please elaborate more on how to use mysql to hide it? do u mean that i have to get the link from a database ?
Thanks.
i found this script online....which has force-download.
<?php
$filename=""; // the name the file will have on client computer
$file_to_download=""; // the name the file has on the server (or an FTP or HTTP request)
$user_agent = strtolower ($_SERVER["HTTP_USER_AGENT"]);
header( "Content-type: application/force-download" );
if ((is_integer (strpos($user_agent, "msie"))) && (is_integer (strpos($user_agent, "win")))) {
header( "Content-Disposition: filename=".$filename);
} else {
header( "Content-Disposition: attachment; filename="$filename);
}
header( "Content-Description: File Transfert");
@readfile($file_to_download);
?>