Well, one way you could generate a so-called random number is to set it to the time it was uploaded, aka, the time() function.
time() generates the number of seconds from January 1st, 1970, which would pretty much guarantee a unique number for each upload. You could always put in a checking mechanism, just to be safe in case of two people uploading files in the same exact second.
Assuming the variable name assigned to the upload file is "Upload_File" and that the path/filename of the new file is $target_file, you could try the following statement to rename the file as you move it:
move_uploaded_file($_FILES['Upload_File']['tmp_name'], $target_file);
Hope this helps...