PHP validation of uploaded WAV file
I'm adding a page to a PHP-based web site, which will allow the user to upload an audio recording in the form of a WAV file, for use in another part of the system.
We only want to allow WAV files, so the PHP script needs to be able to confirm that the uploaded file is indeed a valid WAV: If it is, it will save it; if not, then it will reject it and notify the user.
Can anyone tell me the best way to do this? I can't see much to do with audio files in PHP itself (not really surprising), so I guess I'll need to call an external utility, but any suggestions on what to use would be welcome.
(ps -- we also have various other criteria for the recording, such as the bit-rate, duration, etc; if the same utility can give me those figures as well as confirming whether it's a valid WAV file, then so much the better)