I am trying to run this php script in my linux based server.
$today = strtotime("today");
$tommorow = date("Y-m-d", strtotime("+1day",$today));
$today = date("Y-m-d");
//Endless loop because the data here updates around the clock
while(1){
while (time() <= strtotime("$tommorw 8:00PM")){
sleep(30);
flush();
}
}//end 24 h loop
//save the file as a date file and delete it's content
//move on to the next day
$today = strtotime("today");
$tommorow = date("Y-m-d", strtotime("+1day",$today));
}//end of endless loop
and it workes fine if I run it from a simple browser (ofcourse it stops working when I close it).
I am trying to run it through a perl script
chdir("mydir");
exec('indices.php'); #tryed also system("php indices.php");
and run the perl script like so
./PROMadadim.pl >> ./PROMadadim.log &
but it doesn't work when I am trying to run it from the server.