read())) {
$filepath = “{$path}/{$entry}”;
// could do also other checks than just checking whether the entry is a file
if (is_file($filepath) && filectime($filepath) > $latest_ctime) {
$latest_ctime = filectime($filepath);
$latest_filename = $entry;
}
}
// now $latest_filename contains the filename of the file that changed last

$file = “images/Midway/FI9805P_00626E53699B/snap/” . “$latest_filename”;
$weekday = date(“l”);
$newfile = “images/cam2/midwaylatest” . “.jpg”;

if(!@copy($file, $newfile)) {
$errors= error_get_last();
echo “COPY ERROR: “.$errors[‘type’];
echo “
\n”.$errors[‘message’];
error_log(“failed to copy $file…\n”, 3, “wp-content/error_log”);
echo “failed to copy $file…\n”;
} else {error_log(“Successfully copied $file\n”, 3, “wp-content/error_log”);
}
?>

midway

Midway – Past week Views

Monday

midway

Morning

midway

Noon

midway

Afternoon

Tuesday

midway

Morning

midway

Noon

midway

Wednesday

midway

Morning

midway

Noon

midway

Afternoon

Thursday

midway

Morning

midway

Midday

midway

Afternoon

Friday

midway

Morning

midway

Noon

Saturday

midway

Morning

midway

Noon

midway

Afternoon

Sunday

midway

Morning

midway

Noon

midway

Afternoon