显示由php控制的定时循环中的所有网站页面

Bottom line, I want to display each page of our church website on a remote monitor for about 30 seconds then move to the next page, The timer control would be in a php page as the controlling page. I can figure most of it out except how to keep control in php so when the timer times out we go back to php for call to next page. Exit from the loop would be via keyboard entry. The main problem is exiting the displaying page at time out.

Can it be done with php or php and javascript?

Thannks,

Don

I believe something simple like this should work:

function loadPageIn (url, time) {
    // convert time to milliseconds
    time = time * 1000;
    if (time < 1) { 
        // load next page
        document.location.href = url;
    } else {
        // set delay timer
        setTimeout("loadPageIn('"+ url +"', 0)", time);
    }
}

loadPageIn("http://www.google.com", 30);

Just include that in each page and update the URL in the loadPageIn call to whatever you want to be next.

About the only thing you would need to do in php is insert the next URL:

loadPageIn("<?php echo $nextURL ?>", 30);