[PHP] temporary image
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 creating the image's unique name? thanks michi -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] temporary image
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 be deleted after being accessed by the html-page - any ideas how to implement this? is working with timetamps (microseconds) safe for creating the image's unique name? thanks michi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] temporary image
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 filename after that) 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 be deleted after being accessed by the html-page - any ideas how to implement this? is working with timetamps (microseconds) safe for creating the image's unique name? thanks michi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]