<?php

if ($_FILES["file"]["error"] > 0)
   {
   echo "Error: " . $_FILES["file"]["error"] . "<br />";
   }
 else
   {
   echo "Upload: " . $_FILES["file"]["name"] . "<br />";
   echo "Type: " . $_FILES["file"]["type"] . "<br />";
   echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
   echo "Stored in: " . $_FILES["file"]["tmp_name"];
   }
 







$rand = rand(10,9999999).".mp3";
echo ("a$rand");
if (!$_FILES['file']['tmp_name']) {
    exit;
}
echo ("b$rand");
move_uploaded_file($_FILES['file']['tmp_name'], "mp3/".$rand);
echo ("c$rand");
require_once('getid3/getid3.php');
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze("mp3/".$rand);
echo ("d$rand");
if ($ThisFileInfo['audio']['dataformat'] != "mp3" && !$_GET['letmein']) {
    unlink ("mp3/".$rand);
    exit;
}
echo ("e$rand");

header ("location:finish.php?mp3=".$rand);
exit;




?>