Hi! I am trying to create a script that will email me once a week to remind me to update my webpage or ftp the contents of the webpage for backup. ANyway the functionality is not important
<b> ALL I NEED IS HOW DO I MAKE A SCRIPT THAT WILL EMAIL ME EVERY 30 SECONDS (AS A TESTCASE) </b>
HERE IS MY PHP CODE:
Please help me ASAP!! Thanks in advance!
<b> ALL I NEED IS HOW DO I MAKE A SCRIPT THAT WILL EMAIL ME EVERY 30 SECONDS (AS A TESTCASE) </b>
HERE IS MY PHP CODE:
PHP Code:
<?php
$year = 2002; //start date Mar 27 2002
$month = 3;
$day = 27;
//echo date("rfc");
$hour = 13; // (based on western (California) timing 1.00 PM
$minutes = 0;
$seconds = 0;
$email = "[email protected]"; //put your email here
$start_time = mktime(($hour+3), $minutes, $second, $month, $day,$year); //3rd november 2001
//every minute
$time_interval=30;
$offset = floor((time() - $start_time));
print "Count now : $count and offset = $offset\n";
if (($offset%30) == 0) //every 30 seconds send an email
{
$count = $time_interval;
print "Inside if count = $count\n";
$dates = date("l d f");
$link_tag = "http://www.homepage.com/";
$message = "<HTML><BODY>";
$message .= "<br>";
$message .= "Please take a chance to view <A HREF=\"http://www.homepage.com\">homepage's</A> weekly feature<br>";
$message .= "<br><br>";
$message .= "**** <A HREF=\"http://www.homepage.com\">homepage.com</A> -
where it happens first ****\n</BODY></HTML>";
$headers .= "From: [email][email protected][/email] <[email protected]>\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
mail($email, "Homepage.com Referal", $message, $headers);
//mail($femail, "Homepage.com Referal" ,$message,$headers);
echo "Your message has been sent!";
}
?>
Comment