Verify an upload

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Liquidant
Forum Newbie
Posts: 3
Joined: Mon Feb 20, 2006 11:21 am

Verify an upload

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

You have have to first upload the mp3 to the server before you would be able to check it with PHP.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post 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
Liquidant
Forum Newbie
Posts: 3
Joined: Mon Feb 20, 2006 11:21 am

Post by Liquidant »

oh cool thanks for the tips guys thats great
Post Reply