tedd wrote: > If two, or more, users hit the site at the same time then a RACE > condition may have one user getting something they didn't ask for or > not getting anything at all. > > The complicated way I figure I could solve this would be to: > > 1. Generate a random string name for the file -- instead of test.zip, > it could be ax12nhg34.zip. Either a random name or one based on the session_id(). > I know this will work, but if the user never downloads the file, then > the files accumulate on the server. Use cron to run a daily job of 'find /yourtempdir -type f -ctime +1 | xargs rm' Run more often and/or with less ctime if you need the space or the site is very busy. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php