If you want your PHP program to halt/sleep for a random period of time, use the folowing:
sleep ( rand ( int min, int max));
*sleep is in seconds
so:
sleep ( rand ( 2, 4));
will sleep for 2 to 4 seconds.
http://php.net/manual/en/function.sleep.php
http://php.net/manual/en/function.rand.php
sleep ( rand ( int min, int max));
*sleep is in seconds
so:
sleep ( rand ( 2, 4));
will sleep for 2 to 4 seconds.
http://php.net/manual/en/function.sleep.php
http://php.net/manual/en/function.rand.php
No comments:
Post a Comment