colin-grimy_butthole.hsc $filenm = str_replace(" - ", "-", $file); $filenm = str_replace(" ", "_", $filenm); header("Content-Type: application/force-download"); header("Content-Disposition:$attachment filename=".$filenm.""); header("Content-Length: ".filesize(SCOREBINPATH.$file)); header("Content-Transfer-Encoding: binary"); // Don't allow a hacker to download any file from web // server. Only allow current directory downloads: if (strpos($file,'\\') !== false or strpos($file,'/') !== false or strpos($file,':') !== false) die('Not current directory'); if (!readfile(SCOREBINPATH.$file)) echo "Error: Could not download file."; ?>