Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Set our time variable at the start of the script
- $start = time();
- //Set the counter to run
- $runCounter = TRUE;
- //Start our loop
- while (1) {
- if ($runCounter = TRUE) {
- //Calculate how many seconds after start
- $counter = time() - $start;
- }
- if ($counter > 29 && $runCounter == TRUE) {
- //Stop the counter running as we no longer need it
- $runCounter = FALSE;
- //Run your action here, it will execute after 29 seconds (on the 30th second)
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement