<?php
// Your file name you are uploading
$file_name = $HTTP_POST_FILES['ufile']['name'][0];
$file1_name = $HTTP_POST_FILES['ufile']['name'][1];
$file2_name = $HTTP_POST_FILES['ufile']['name'][2];
$file3_name = $HTTP_POST_FILES['ufile']['name'][3];
$file4_name = $HTTP_POST_FILES['ufile']['name'][4];
$file5_name = $HTTP_POST_FILES['ufile']['name'][5];
$file6_name = $HTTP_POST_FILES['ufile']['name'][6];
$file7_name = $HTTP_POST_FILES['ufile']['name'][7];
$file8_name = $HTTP_POST_FILES['ufile']['name'][8];
$file9_name = $HTTP_POST_FILES['ufile']['name'][9];
// random 4 digit to add to our file name
// some people use date and time in stead of random digit
$random_digit=rand(00000000,99999999);
$random_name=rand(0000,9999);
$random_names=rand(0000,9999);
$random_digits=rand(0000,9999);
$random_namess=rand(0000,9999);
$random_namesss=rand(0000,9999);
$random_digitssss=rand(0000,9999);
$random_namessssss=rand(0000,9999);
$random_namesssssss=rand(0000,9999);
$random_vardas=rand(0000,9999);
//combine random digit to you file name to create new file name
//use dot (.) to combile these two variables
$new_file_name=$random_digit.$file_name;
$new_file1_name=$random_name.$file1_name;
$new_file2_name=$random_names.$file2_name;
$new_file3_name=$random_digits.$file_name;
$new_file4_name=$random_namess.$file1_name;
$new_file5_name=$random_namesss.$file2_name;
$new_file6_name=$random_digitssss.$file_name;
$new_file7_name=$random_namesssss.$file1_name;
$new_file8_name=$random_namessssss.$file2_name;
$new_file9_name=$random_vardas.$file_name;
//set where you want to store files
//in this example we keep file in folder upload
//$HTTP_POST_FILES['ufile']['name']; = upload file name
//for example upload file name cartoon.gif . $path will be upload/cartoon.gif
$path1= "upload/$new_file_name";
$path2= "upload/$new_file1_name";
$path3= "upload/$new_file2_name";
$path4= "upload/$new_file3_name";
$path5= "upload/$new_file4_name";
$path6= "upload/$new_file5_name";
$path7= "upload/$new_file6_name";
$path8= "upload/$new_file7_name";
$path9= "upload/$new_file8_name";
$path10= "upload/$new_file9_name";
//copy file to where you want to store file
copy($HTTP_POST_FILES['ufile']['tmp_name'][0], $path1);
copy($HTTP_POST_FILES['ufile']['tmp_name'][1], $path2);
copy($HTTP_POST_FILES['ufile']['tmp_name'][2], $path3);
copy($HTTP_POST_FILES['ufile']['tmp_name'][3], $path4);
copy($HTTP_POST_FILES['ufile']['tmp_name'][4], $path5);
copy($HTTP_POST_FILES['ufile']['tmp_name'][5], $path6);
copy($HTTP_POST_FILES['ufile']['tmp_name'][6], $path7);
copy($HTTP_POST_FILES['ufile']['tmp_name'][7], $path8);
copy($HTTP_POST_FILES['ufile']['tmp_name'][8], $path9);
copy($HTTP_POST_FILES['ufile']['tmp_name'][9], $path10);
//$HTTP_POST_FILES['ufile']['name'] = file name
//$HTTP_POST_FILES['ufile']['size'] = file size
//$HTTP_POST_FILES['ufile']['type'] = type of file
echo "<img src=\"$path1\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path2\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path3\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path4\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path5\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path6\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path7\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path8\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path9\" width=\"150\" height=\"150\">";
echo "<P>";
echo "<img src=\"$path10\" width=\"150\" height=\"150\">";
?>