M2com
08-15-2011, 12:47 AM
In my script I need to check the time but it for some reason it totally forgets the whole thing. Hope this makes sense what I am asking! Here is my script:
<?php
ignore_user_abort(true);
set_time_limit(70000000000000000000000000000000000);
error_reporting(0);
$time=date('g A');
$directory = 'users/';
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$file = preg_replace('/(.*)\..*/', '$1', $file);
$fp=fopen("$file/log.txt","r"); //Opens the Pass.txt file
$date=fgets($fp);
$fp=fopen("$file/email.txt","r"); //Opens the Pass.txt file
$newemail=fgets($fp);
$newdate=$date-3;
$today=date('d');
if ($time = "3 am") {
if ($date== $today-4) {.........
}
}
}
}
closedir($handle);
}
?>
<?php
ignore_user_abort(true);
set_time_limit(70000000000000000000000000000000000);
error_reporting(0);
$time=date('g A');
$directory = 'users/';
if ($handle = opendir($directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$file = preg_replace('/(.*)\..*/', '$1', $file);
$fp=fopen("$file/log.txt","r"); //Opens the Pass.txt file
$date=fgets($fp);
$fp=fopen("$file/email.txt","r"); //Opens the Pass.txt file
$newemail=fgets($fp);
$newdate=$date-3;
$today=date('d');
if ($time = "3 am") {
if ($date== $today-4) {.........
}
}
}
}
closedir($handle);
}
?>