Hello,
I am trying to write a code where I can use wait timer function in PHP. I have tried it but no success yet. so, if you guys have any idea then please let me know. Thank you for your help.
Hello,
I am trying to write a code where I can use wait timer function in PHP. I have tried it but no success yet. so, if you guys have any idea then please let me know. Thank you for your help.
Hello,
Check out this code
Code:<?php $lgn = time(); $gtusr = mysql_query("SELECT * FROM `users` WHERE `users`.`id` = '$MyId'"); $usrinf = mysql_fetch_assoc($gtusr); $lstlgn = $usrinf['lstlgn'] - $lgn; echo "Logged in as: " . $usrinf['username']; echo "Last logged in: " . $lstlgn; echo "PMs: ".$unread." unread, ".$read." read"; ?>
Hello,
Try this code, though I am not sure that this is what you need
Code:<?php if(!$sql){ echo 'There has been an Error for Submitting your request. Please Contact the Web Master.'; }else{ echo "Hello <u><b>".$name."</b></u>"; echo '<br/><hr>Thank you'; echo '<br/><br/>process is under request sleep(5); echo '<script><!-- window.location= "addresshere" //--></script>'; }
Hello,
Just try this
Code:<?php this is the current time echo date('h:s:i') . "\n"; time seconds for 10 sleep(10); this is where you wake up echo date('h:s:i') . "\n"; ?>
Hello,
If you need then you can have a look at the following code
Code:function stopWatch($total = false,$reset = true){ global $frscld; global $lstcld; $nwtm = microtime(true); if ($lstcld === null) { $lstcld = $nwtm; $frscld = $nwtm; } if ($total) { $time_diff = $nwtm - $frscld; } else { $time_diff = $nwtm - $lstcld; } if ($reset) $lstcld = $nwtm; return $time_diff; }
Hello,
Alternatively you can try this
Code:<?php srt(); ob_implicit_flush(true); //[ OR ] echo "..."; flsh(); flush(); set_time_limit(0); function sleep_echo($secnds) { $secnds = (int) $secnds; $buff = str_repeat(".", 4096); //echo $buff."\r\n<br />\r\n"; for ($i=0; $i<$secnds; $i++) { echo date("H:i:s", time())." (".($i+1).")"."\r\n<br />\r\n".$buff."\r\n<br />\r\n"; flsh(); flush(); sleep(1); //usleep(1000000); } }
Hello,
Just take a look at the following code
Code:<?php sip(0.5); ?> <?php function sip($scnds) { $scnds = abs($scnds); if ($scnds < 1): usleep($scnds*1000000); else: sleep($scnds); endif; } ?>
Bookmarks