function loadMimeTypes() { $mimeconf = fopen("mimetypes.conf", "r"); while ($line = fgets($mimeconf, 4096)) { $types = explode(" = ", $line); foreach ($types as $type) { $exts = explode(" ", $type[0]); foreach ($exts as $ext) { $this->mimeTypes[$ext] = $type[1]; } } print_r($this->mimeTypes); } }Output from function (printed for each line in the file):Array( [h] => t [a] => s [c] => s [d] => v [b] => m [o] => d [p] => p [s] => g [x] => m [w] => m [v] => i [g] => i [j] => p [l] => a [n] => c [t] => e [m] => p [u] => s [z] => i [r] => t [i] => g [e] => t [q] => t)Contents of mimetypes.conf:hqx = application/mac-binhex40cpt = application/mac-compactprodoc = application/mswordbin dms lha lzh exe class so dll = application/octet-streamoda = application/odapdf = application/pdfai eps ps = application/postscriptsmi smil = application/smilxls = application/ms-excel... etc ...