Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
I may see a possible problem, but I'm not sure.
you do
PHP Code:
srand(time()); $filename = (rand()%1000000000);
First there is no need for it.
Second, the modulo with such a big value could reduce it to a value that might have collisions.
I'd recommand you to try to replace this bit with an uniqid() call.
http://www.php.net/manual/en/function.uniqid.php
PHP Code:
$filename=md5(uniqid(rand(), true));
Maybe this could solve your problem.
__________________
Only a biker knows why a dog sticks his head out the window.
|