#! /usr/bin/env php $last_time) { $lines = file($file); $last_line = $lines[count($lines)-1]; sound_alarm($last_line); } } $last_time = filemtime("watchdog_exec_time"); if (!$last_time) { sound_alarm("Couldn't find watchdog_exec_time"); } touch("watchdog_exec_time"); check_log_file("error_log", $last_time); ?>