How to run a php function after certain time without using cron -


i have block of code , want run after time intervals, after every 3 seconds. if required result should die otherwise request sent after 3 seconds. idea php.

thanks in advance help

you can sleep in loop:

while (true) {     $result = dosomething;     if (resultisgood) {         break;     }     sleep(3); } 

if don't want keep browser waiting, can ignore_user_abort() solutions on google.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -