kmunky kmunky - 1 year ago 94
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 Source

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().

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download