alternative to finfo() for php < 5.3
<pre><code>&lt;?php 
$finfo = new finfo();
$fileinfo = $finfo-&gt;file($_FILES["fileToUpload"]["tmp_name"], FILEINFO_MIME);

switch($fileinfo) {
    case "image/gif":
    case "image/jpeg":
    case "image/png":
       move_uploaded_file($_FILES["fileToUpload"]["tmp_name"],
    "upload/" . $_FILES["fileToUpload"]["name"]);
    echo "Your file has successfully been uploaded, and is awaiting moderator approval for points." . "&lt;html&gt;&lt;br&gt;&lt;a href='uploadfile.php'&gt;Upload more.&lt;/a&gt;";
    break;
     default:
     echo "Files must be either JPEG, GIF, or PNG and less than 10,000 kb";

        break;
        }


?&gt;
</code></pre>

<p>it has recently been brought to my attention there is nothing wrong here, it just doesnt work because my servers php is only at 5.2  lemme know if you guys can find a way to make it work using MIME</p>
