in reply to Automatically creating incremental file names

OR

Just let someone else handle the uniqueness issue.

If you are on Apache, just use the $ENV{UNIQUE_ID} value to get your unique string, and go from there...

The Apache module that does it is http://httpd.apache.org/docs/mod/mod_unique_id.html and it quite probably either already installed on your apache, although it might not be enabled. You just remove the comments, and restart.