PHP Upload Timeouts: More Efficient Upload Script?

haxifix

New Member
I have written a pretty basic upload script that takes the file and uploads it using the standard move_uploaded_file method as you see below:\[code\]//UPLOAD IMAGE $path = "../../clients/$realClient/" . $_FILES["image"]["name"][$x]; move_uploaded_file($_FILES["image"]["tmp_name"][$x], $path); $displayPath = "private/clients/$realClient/" . $_FILES["image"]["name"][$x]; mysql_query("INSERT INTO images VALUES(NULL, '$displayPath', '$client', '$project', '$newWeight')") or die("Unable to Insert Image - Please Try Again"); echo "File Successfully Uploaded<br />";\[/code\]This upload script works perfectly for most purposes. Here's my issue:I have a standard shared hosting package so sometimes when the user tries to upload a file that takes over five minutes to upload (say a video or some other high res media), the server times out. The hosting company has said that as it's a shared hosting server they are unwilling to increase the timeout limit for me.Is there a more efficient upload script that will allow files to go up in under five minutes or is there perhaps an alternative you could suggest?Cheers,Dan
 
Back
Top