Hi,
I have a script that'll check to see if it's a specific time. For example, if the time is 8:33 P.M., then i wanna leave a message on the browser. Here's half of my script:
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime;
if ($hour > 12) {
$hour = $hour - 12;
$ampm = "P.M.";
} else {
$ampm = " A.M.";
}
if ($min eq "0" {
$min = "00";
}
elsif ($min eq "1" {
$min = "01";
}
elsif ($min eq "2" {
$min = "02";
}
elsif ($min eq "3" {
$min = "03";
}
elsif ($min eq "4" {
$min = "04";
}
elsif ($min eq "5" {
$min = "05";
}
elsif ($min eq "6" {
$min = "06";
}
elsif ($min eq "7" {
$min = "07";
}
elsif ($min eq "8" {
$min = "08";
}
elsif ($min eq "9" {
$min = "09";
}
if ((($hour == 8) && ($min == 33) && ($amp eq "P.M.")) {
print "Server Message";
exit;
}else{
&main_page;
}
I don't know but it's not displaying the message. Is it beacuse of the 'exit' function? Anyone knows what's wrong?
I have a script that'll check to see if it's a specific time. For example, if the time is 8:33 P.M., then i wanna leave a message on the browser. Here's half of my script:
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime;
if ($hour > 12) {
$hour = $hour - 12;
$ampm = "P.M.";
} else {
$ampm = " A.M.";
}
if ($min eq "0" {
$min = "00";
}
elsif ($min eq "1" {
$min = "01";
}
elsif ($min eq "2" {
$min = "02";
}
elsif ($min eq "3" {
$min = "03";
}
elsif ($min eq "4" {
$min = "04";
}
elsif ($min eq "5" {
$min = "05";
}
elsif ($min eq "6" {
$min = "06";
}
elsif ($min eq "7" {
$min = "07";
}
elsif ($min eq "8" {
$min = "08";
}
elsif ($min eq "9" {
$min = "09";
}
if ((($hour == 8) && ($min == 33) && ($amp eq "P.M.")) {
print "Server Message";
exit;
}else{
&main_page;
}
I don't know but it's not displaying the message. Is it beacuse of the 'exit' function? Anyone knows what's wrong?