script containing all downloadable formats

I have created a download.php file in which there is an array which holds allowed extensions.
To collect manually, the extension and its mime type, its going to be very difficult and hence would like to know if we can get any automated script in which all extensions and its mime types are covered.
here is the way I did it.
$allowed_ext = array (
‘gif’ => ‘image/gif’,
‘png’ => ‘image/png’,
‘jpg’ => ‘image/jpeg’,
‘jpeg’ => ‘image/jpeg’
It would be helpful if some one can give an entire script like this.

Sponsor our Newsletter | Privacy Policy | Terms of Service