I am trying to notify a user, the status of a (another)script the runs in background (it runs once every minute).
So I have this php code:
while(@fopen("dl.conf","r")){
print "Download will start soon";
flush();
sleep(1);
}
.
.
It doesn't print anything, plus even if I cancel that file it won't execute the rest of the script.
basically a user can submit a file to download. this will trigger the file dl.conf to be created. there is a script running in background checking if dl.conf exists, if so it reads it, and starts the download. It will delete dl.conf file too.
It might happen that the user submit the download but the script will take few more seconds to run again, and realize that there is something to download. so I just want the user to wait for the download which will start very soon (then the download progress will be shown).
thank you