(2*3600)) { // two hours unlink($file); } } if (file_exists($file)) { $fileage = (time() - filemtime($file)); if ($fileage > (1.25*3600)) { // half hour $killout = shell_exec("kill -9 {$thisProc}"); $ds = date("D M j G:i:s T Y"); $txt = "Firefox, News or Vivaldi [{$thisProc}] killed at {$ds}\n"; $fh = fopen($killLog, "a"); fwrite($fh, $txt); echo $txt; fclose($fh); unlink($file); } else { echo "File age: {$fileage}\n"; } } else { $fh = fopen($file, "w"); fwrite($fh, "{$thisProc}\n"); fclose($fh); } } } ?>