a pretty easy JS implementation would be this:
var interval = (function(iframe)
{
var idx = 0,//current idx
urls = <?= json_encode($urlArray); ?>;//array of urls
iframe.src = urls[idx++];//set first url
return setInterval(function()
{//callback function, will be executed every 3 seconds
iframe.src = urls[idx++];
if (idx >= urls.length)
{//we've just reached set last url
idx = 0;//this resets the loop, after 3 seconds, the first url is used again
//alternatively
clearInterval(interval);//end of the loop
}
}, 3000);//3000 miliseconds, or every 3 seconds
}(document.getElementById('yourIframeID')));//pass reference to your iframe here
This line:
<?= json_encode($urlArray) ?>
Is, of course a PHP statement, and has to run server-side, if you can't alter the JS from PHP, you can get the urls through an ajax call
The fiddle loops through the urls twice, and then just terminates the interval, the iframe.src statements have been commented out, since the fiddle uses a div, but you get the basic idea
sleepis used on the server side, he can't show the code before sleep then redirect