kmunky kmunky - 5 months ago 12
PHP Question

PHP how can i check if a file is mp3 or image file?

how can i check if a file is an mp3 file or image file, other than check each possible extension?

Answer

You can identify image files using getimagesize.

To find out more about MP3 and other audio/video files, I have been recommended php-mp4info getID3().