[PHP] temporary image

2001-12-19 Thread Michael Mehlmann
hallo, my applications generates a html-page, with a link to an image. this image is created by the application, and should exist only temporarily - so it can be deleted after being accessed by the html-page - any ideas how to implement this? is working with timetamps (microseconds) safe for

Re: [PHP] temporary image

2001-12-19 Thread Bogdan Stancescu
Hi! You may want to check out the tempnam() function -- it's under filesystem functions in the downloadable documentation. Bogdan hallo, my applications generates a html-page, with a link to an image. this image is created by the application, and should exist only temporarily - so it can

Re: [PHP] temporary image

2001-12-19 Thread Bogdan Stancescu
On the other hand if you want to keep track of the number of files generated you might want to try something like this: $i=1; $thePath=$temp_dir./$fileprefix; while (file_exists($thePath.$i)) { $i++; } $thePath.=$i; ($thePath stores a valid temp