Piero
Piero

Reputation: 9273

Start PHP script and then check the progress

i have a server, in which i have a mysql database and php, i have created an admin dashboard, and i want do this: i want click a button to start a PHP script that update my database taking information from the web, then when i close my admin dashboard, i want for example after 3 hours check the status of the php script, for example with a progress bar, and if i want i want stop or pause this script is that possible?

i have think a loop like the while for instances:

while (buttonnotpressed && updatenotfinish)
{
 //update database
}

it's just an example, i'm looking for a lot of books, and i have searched on the web, but i can't find an answer...thanks!

Upvotes: 0

Views: 101

Answers (1)

ITroubs
ITroubs

Reputation: 11215

make an async call from jquery to your php file

that file will then begin to work

then the other button does another async call to another php file that just writes some string to a file.

in your first file you now check in your while whether that one file contains some string

Upvotes: 1

Related Questions