Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-16-2008, 11:44 AM   #1
Registered: Mar 2003
Location: Berkshire, England.
Distribution: SuSE 10.0
Posts: 299

Rep: Reputation: 32
Question PHP validation of uploaded WAV file

Hi all.

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.

Many thanks!

(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)
Old 12-16-2008, 05:27 PM   #2
Senior Member
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
The following web site may help,


php, upload, validation, wav

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple date validation in PHP tooparam Programming 1 04-08-2006 01:50 PM
php validation logic spoody_goon Programming 5 01-14-2006 07:31 PM
get full path of uploaded file in php spoody_goon Programming 2 05-10-2005 07:32 PM
Confused trying to do password validation in PHP Pcghost Programming 4 02-02-2004 12:10 PM
Form validation problem (PHP+MySQL) linuxfond Programming 13 09-08-2003 12:11 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration