Hi
The script I'm writing needs to wait a random amount of time (1-300s)
between each iteration of a loop, eg.
while(condition ) {
do something
//wait between 1s and 5 minutes
sleep(rand(1,30 0));
}
Problem is, a browser times out if it doesn't get an answer within
about 30 seconds. Is the idea of having a PHP script sleep for a
longer amount of time incompatible with web applications? Any
work-around?
Thank you.
The script I'm writing needs to wait a random amount of time (1-300s)
between each iteration of a loop, eg.
while(condition ) {
do something
//wait between 1s and 5 minutes
sleep(rand(1,30 0));
}
Problem is, a browser times out if it doesn't get an answer within
about 30 seconds. Is the idea of having a PHP script sleep for a
longer amount of time incompatible with web applications? Any
work-around?
Thank you.
Comment