Depending on how you are doing the session/image you could do the following:

<?php
// Open the temp folder where sessions are:
// $session_folder
// Open the folder where the temp images are held
// $image_folder
for ($file in $session) { $filename_array[] = $file;}
if ($file in $image != in_array($filename_array)) {unlink($file_in_image);}
?>

Then save that as a cron job that runs every minute or every 5 and (depending 
on site needs) and you should be good to go.

Wolf
---- Fernando <[EMAIL PROTECTED]> wrote: 
> Hello,
> 
>     I made a image validation code, wich generate a image every time the 
> user enters a page.
> 
>     The name of the image uses the session id, and I save it in a temporary 
> directory.
> 
>     When the user close the browser (or leave the site) I would have to 
> delete the image (or else I will start to have many garbage images in the 
> temp directory).
> 
>     Is there any way to do that? From PHP?
> 
> Fernando Bonafé
> Artista Plástico
> (19) 81184401
> (19) 32322239
> [EMAIL PROTECTED]
> _____________________________
> www.opapagaiorinoceronte.net 
> 
> -- 
> 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

Reply via email to