Hello everyone. I have a php script that automatically emails me when a webcam freezes. It is set up to email me after 5 refreshes. 1 refresh = 45 seconds.
My php file is set to 225 so that it emails me if the time hasn't changed.
It works but the problem is that it emails me right away.
Can someone take a look and offer some help. I appreciate the help!
<?php
$file="test.jpg";
clearstatcache();
$time=filemtime($file);
$CurTime=time();
$dif=$CurTime - $time;
if ($dif > 82500)
{
mail("Webmaster <webmaster@matsukidesignsolutions.com>","The webcam is frozen","");
}
echo"document.write()";
?>