Page 1 of 1

Verify an upload

Posted: Mon Feb 20, 2006 11:36 am
by Liquidant
I was wondering if there was a possible way of verifiying that an MP3 upload is set at a certain bitrate or below before it is uploaded.

eg

mysong.mp3 is 128kbps

when this is submitted via the upload page it is checked to see if the bitrate is 128kbps or below. and uploaded to the server.

mysong2.mp3 is 256kbps

however if i attempt to upload this file It would return an error message saying

"mysong2.mp3 is not at the correct bitrate please correct and upload again. upload canceled"



Is this possible using PHP or would I need to look at some other way of doing this.

many thanks in advance for your input.

Chris

Posted: Mon Feb 20, 2006 11:39 am
by John Cartwright
You have have to first upload the mp3 to the server before you would be able to check it with PHP.

Posted: Mon Feb 20, 2006 12:44 pm
by josh
I think the bitrate is stored in the ID3 data, there are classes that read ID3 into an array for you, google for them

Posted: Mon Feb 20, 2006 1:28 pm
by Liquidant
oh cool thanks for the tips guys thats great