Is there a built-in function in php or something similar, in order to know the MIME file - to display the format. For example:
image/gif -> gif image/jpeg - jpg etc.
PS You can of course use regular expressions, but can it still be somehow different?