What you may want to try doing is when the script is ran, it goes through a "clean-up" function and deletes everything that it doesn't need for the current execution. Though, realize that if two people hit a page within a few seconds, you may end up deleting some images that the first user is trying to get rid of. You'll have to judge the traffic for yourself and figure out if this is a viable option. Other solutions that I can think of is after the page is ran you update a text file with the names of the images that are to get deleted and just run a cronjob to read this file and delete the files in there. Similarly, you could add the names to a db table with a timestamp and delete all files that are older than a particular time. Many options, but you have to figure out what works best for you. -M > -----Original Message----- > From: Julian [mailto:julian@xxxxxxxxxx] > Sent: Friday, November 26, 2004 2:14 PM > To: php-general@xxxxxxxxxxxxx > Subject: unlink images > > Hello, > I would like to delete a set of images right after they are > displayed on the page using unlink. Unfortunately, with > unlink the images are deleted before they display on the > user's browser. Is there a way to do this? > > Thank you! > > -- > PHP General Mailing List (http://www.php.net/) To > unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php