On 10/3/07, Dave M G <martin@xxxxxxxxxxxxx> wrote: > So, ultimately, what I'm wondering is, what should I be using in order > to determine file MIME types that will be the most commonly installed on > servers with PHP? I wrote something that does system("file -iNr $file") which gives you the application/mime-type output. the problem is that it was video files, and a bunch of the microsoft video formats wind up showing up as just generic binary data, just like executable files. I wound up disabling it as I could not rely on it (I had to say "skip *.wmv from processing" which rendered the whole point of this useless) Depending on what you need the output for, that could work quite well. Look into using file through the system() call. From the file types you listed above I think it can identify them pretty well. Adjust the options as needed. I decided to go that route instead of trying to find a PECL or PEAR solution (or I checked and it didn't seem like a good one was available at the time) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php