How unique is temporary file names (from file upload)?

How unique is temporary file names (from file upload)?

am 10.01.2008 16:56:12 von Mikhail Kovalev

I'm storing all uploaded files in one directory -- with the same
temporary names they are given by PHP. I do so because I don't want an
uploaded file to overwrite an already exisiting one, so I need to know
whether these names are unique only per session and can reappear at a
different time, or are they unique for every upload... ever?

Thanks!=)

mvh
M. K.

Re: How unique is temporary file names (from file upload)?

am 10.01.2008 17:21:06 von Courtney

Mikhail Kovalev wrote:
> I'm storing all uploaded files in one directory -- with the same
> temporary names they are given by PHP. I do so because I don't want an
> uploaded file to overwrite an already exisiting one, so I need to know
> whether these names are unique only per session and can reappear at a
> different time, or are they unique for every upload... ever?
>
> Thanks!=)
>
> mvh
> M. K.
Ever is a long time. I think they are compounded from the date in milli
seconds and a php string. So maybe when the whole unix time system rolls
around in 2025, you might see some duplicates..

Or something like that.

Re: How unique is temporary file names (from file upload)?

am 11.01.2008 17:24:21 von Toby A Inkster

The Natural Philosopher wrote:

> So maybe when the whole unix time system rolls around in 2025, you might
> see some duplicates..

2038

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 12 days, 3:37.]
[Now Playing: Europe - The Final Countdown]

NetSol Cybersquatting
http://tobyinkster.co.uk/blog/2008/01/10/netsol-cybersquatti ng/

Re: How unique is temporary file names (from file upload)?

am 12.01.2008 15:25:19 von radmission05

On Jan 10, 7:56 am, Mikhail Kovalev wrote:
> I'm storing all uploaded files in one directory -- with the same
> temporary names they are given by PHP. I do so because I don't want an
> uploaded file to overwrite an already exisiting one, so I need to know
> whether these names are unique only per session and can reappear at a
> different time, or are they unique for every upload... ever?
>
> Thanks!=)
>
> mvh
> M. K.

why bother with temp files, it will be deleted on cleaning. so it
maybeor or it wont duplicate, and will not overwrite another one.
to sure it wont, try to copy that on other folder, rename it with the
random + date + time filename so it will be unique. time is unique,
the date yesterday will not be the date for tommorow.. but the problem
is, if they reset or change their server time. Thats why i put random
(11 chars and numbers).