Quote: "PHP looks like an ugly language"
Take that back! lol
It's only looks ugly because he doesn't have a proper structure in his code.
Now back on topic :
Quote: "// Extract the type of file which will be sent to the browser as a
header"
This is wrong for obvious reasons ... "browser as a" has to be on the same row as the // or it's not treated like a comment.
Quote: "// Modify this line to indicate the location of the files you want
people to be able to download
// This path must not contain a trailing slash. ie.
/temp/files/download"
Same thing here.If the script is giving you a parse error,this is probably the problem.
Quote: "\"".$_POST['filename']."\"
There's no need for this crap.When the echo (die) uses double quotes you could just use
die("I'm sorry, the file <a href='$_POST[filename]'>$_POST['filename']</a> doesn't seem to exist.");
Quote: "$file = "$download_path$file";"
You're better off changing it to :
$file = $download_path.$file;
I don't really like your coding style,It's very unorganized,but maybe that's just me.
One thing I want to know , what exactly is the problem?
Parse error?
The script not doing exactly what you want?

PC Specs:Windows 7 Ultimate 64-bit,Intel Core i7 960 @ 3.20GHz,NVIDIA GeForce GTX 480,12GB RAM,2x Western Digital 997GB HDD