Rename file on uploading to Random name
<p>I was wondering about the faster and the stronger way to rename a file to random ( Letters and Numbers ) </p>

<p>Another issue is : I'm trying to put many NOT allowed type of files but actually my code is only work with one type !! So, if you may show me how I can put many types :)</p>

<p>This is my code:</p>

<pre><code>   if ( $_REQUEST['do'] == "doUpload" )
{
  $TEMP = $_FILES['userfile']['name'];
  $FileName = stripslashes($TEMP);  
  $FileType = strrchr($FileName ,'.'); 

  $box = $uploadDIR.'/'.$TEMP;

$notype= ".php";

if ($FileType == $notype){

echo "NOT ALLOWED TO ATTACH THIS KIND OF TYPES";

exit;
}
  if (file_exists($box))
  {
    echo "&lt;center&gt;&lt;b&gt;&lt;font color=red&gt;THE FILE ALREADY EXIST&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;a href='http://$httpname/$box' target='_blank'&gt;THE LINK&lt;/a&gt;&lt;/b&gt;&lt;center&gt;";
  }
  else
  {
    move_uploaded_file($_FILES['userfile']['tmp_name'],$box);

  echo " SUCCESS ";
</code></pre>
