Hello!
I have a simple webcam set up that uploads a picture every 10 seconds. Expect, my computer is on at different times of the day. I would like a script that says "WEBCAM ONLINE" or "WEBCAM OFFLINE" depending on if the webcam has updated within the last 20 seconds.
I guess this could be done with checking the file for the last time it was updated and a IF statement.
$filename = 'current.jpg';
if (file_exists($filename)) {
echo "" . date ("F d, Y - h:i:s A", filemtime($filename));
}
Here's some code that will check when my file has been modified.
I would love it if you could give my some tips, or write a script for me!
Thanks!