Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can someone help with my php file dealing with email????

Status
Not open for further replies.

Hisakata

Technical User
Sep 24, 2002
36
US
Hello to everyone who is reading this and thank you for taking your time to do so.

Okay my file is this.

<?php
$file=&quot;test.jpg&quot;;
clearstatcache();
$time=filemtime($file);
$CurTime=time();
$dif=$CurTime - $time;
if ($dif > 225)
{
mail(&quot;Webmaster <webmaster@matsukidesignsolutions.com>&quot;,&quot;The webcam is frozen&quot;,&quot;&quot;);
}
echo&quot;document.write()&quot;;
?>

This tells my server to email me if my webcam freezes. If it refreshes 5 times at 45 seconds each(the 225) without changing the picture (test.jpg) then it emails me and tells me.

It works but the problem is that it emails me too early. I have no idea why. I messed with the time (225) and the symbols Greater than or less than. Nothing works.

Can someone help? I would greatly appreciate it.
 
Are you getting good values for the modification time of the file? ______________________________________________________________________
TANSTAAFL!
 
i have no idea what you mean. I am a newbie. Sorry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top