[eluser]Chris Newton[/eluser]
Tried to add this to a recent script... but Dreamhost doesn't have the Fileinfo extension installed by default. I guess you can compile your own version of PHP, but it's for an internal project and I don't have time to get into all that. Regardless, I saw this months ago, and I still think it's a great idea, and great little extra. Thanks.
BTW, in the script above, there's an extra ) at the end of the echo statement.