Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function humanFileSize(bytes, si) {
- var thresh = si ? 1000 : 1024;
- if(bytes < thresh) return bytes + ' B';
- var units = si ? ['kB','MB','GB','TB','PB','EB','ZB','YB'] : ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];
- var u = -1;
- do {
- bytes /= thresh;
- ++u;
- } while(bytes >= thresh);
- return bytes.toFixed(1)+' '+units[u];
- };
- $getID3 = new getID3;
- $file = $getID3->analyze($filename);
- echo("Duration: ".$file['playtime_string'].
- " / Dimensions: ".$file['video']['resolution_x']." wide by ".$file['video']['resolution_y']." tall".
- " / Filesize: ".$file['filesize']." bytes<br />");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement