php 实现自动连续打开网页

<html>

<head>

<script type="text/javascript" src="jquery-1.4.4.js"></script>

<head>

<body>

<div id="url_list" >

<?php


$a = scandir('./nav');

$f=0;

foreach($a as $i=>$c)

{

if(strstr($c,'navConfig_'))

{

list(,$suffix) = explode('navConfig_',$c);

        $suffix = substr(trim($suffix),0,-4);

$url = 'http://'.$suffix.'.focus.cn/housemarket/?t='.time();

echo '<a href="'.$url.'" target="_blank">'.$suffix.'</a>';

$i++;

if($i%10){

echo '&nbsp;';

}else{

echo '<br/>';

}

//echo 'http://'.$suffix.'.focus.cn/houseblog/';

//echo '<br/>';

}

}

?>

</div>

</body>

</html>

<script type="text/javascript">



var interval;

var url = '';

var objs = $('#url_list').find('a');

var len=objs.length;


var i=0;

function openUrl(){

var url = objs[i];

if(url == 'undefined' || i>150){

           window.clearInterval(interval);

  interval = null;

}

if(i%10==0){

if(confirm('继续?')){

window.open(url,'_blank');

}

else

{

window.clearInterval(interval);

}

}else{

window.open(url,'_blank');

}

    i++;

}

interval = window.setInterval(openUrl,2000);


</script>


你可能感兴趣的:(PHP,url,连续,打开)