Index: /trunk/ippMonitor/def/autocodeImage.php
===================================================================
--- /trunk/ippMonitor/def/autocodeImage.php	(revision 28613)
+++ /trunk/ippMonitor/def/autocodeImage.php	(revision 28614)
@@ -2,4 +2,5 @@
 
 include 'ipp.php';
+delete_old_tmp_files();
 
 $ID = checkID ();
@@ -159,6 +160,3 @@
 menu_end();
 
-unlink($datFilename);
-unlink($pngFilename);
-
 ?>
Index: /trunk/ippMonitor/raw/ipp.php
===================================================================
--- /trunk/ippMonitor/raw/ipp.php	(revision 28613)
+++ /trunk/ippMonitor/raw/ipp.php	(revision 28614)
@@ -875,3 +875,16 @@
 $filteringParameters = array();
 
+//
+// Delete temporary files if they are older than $expire_time minutes
+//
+function delete_old_tmp_files() {
+  // define after how many minutes the files should be deleted
+  $expire_time = 15;
+  exec("find /tmp -user apache -amin +$expire_time", $output, $status);
+  foreach ($output as $key => $value) {
+    exec("rm -f $value");
+    $count++;
+  }
+}
+
 ?>
