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
sleep ( rand ( 2, 4));
will sleep for 2 to 4 seconds.
YOU CAN SUPPORT DEVNINJA WITH A CUP OF COFFEE
As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online. to search or browse the published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or more ) as a token of appreciation.