Hi. I have a file with unique information on each line, I want one line at a time to be printed to file.php with a 20min interval. ex info file. "abc def ghi jkl mno" So, for the first 20min i want "abc" to show in file.php, after 20min it should show "def" and after another 20min i want it to show "ghi", and so on.. It doesnt matter if it reads from the info file or if I paste the contents to file.php and it reads from within itself, so to speak. Im sure this could be easily done, right? Anyone care to help out? I would be very greatful!
If I understand correctly, You need some thing like this: file.php <?php $file = 'some.info'; // info-file $delay = 20*60; // Delay in seconds $info = file($file); $count = count($info); $key = time() % ($delay*$count); print trim($info[(int)$key/$delay]); ?> PHP: