How to generate Random Numbers at Regular Intervals in PHP?

How to generate Random Numbers at Regular Intervals in PHP? 

Following is the simple PHP tutorial to demonstrate how to generate random numbers at regular intervals in PHP? I will use jquery setInterval() method for calling PHP file (which generates random numbers) at regular intervals say after every second in my example. I will use PHP rand() function to generate random numbers in PHP. I am using google CDN for jquery libraray. So here is the simple example in PHP to generate random numbers at regular intervals.

index.php file







generate_random_numbers.php file

echo rand();
?>

So, that's all. Above PHP code snippet is very easy to understand by everyone. So, I don't think there is need of any explanation.