Delay execution of the current script for 5 seconds in PHP
Description
The following code shows how to delay execution of the current script for 5 seconds.
Example
//from w w w . jav a 2 s . c om
<?php
echo date('h:i:s') . "<br>";
//sleep for 5 seconds
sleep(5);
//start again
echo date('h:i:s');
?>
The code above generates the following result.