4,251
社区成员
发帖
与我相关
我的任务
分享
<?php
$i = 1;
for ($i=1; $i<5; $i++){
echo "第".$i."页数据"."<br><br>";
$test = file_get_contents('http://datainterface.eastmoney.com/EM_DataCenter/JS.aspx?type=FD&sty=MTE&mkt=1&code=600000&st='.$i.'&sr='.$i.'&p='.$i.'&ps=25');
echo $test."<br><br><br>";
}
?>
$i = 1;
for ($i=1; $i<5; $i++){
echo "第".$i."页数据"."<br><br>";
$url = 'http://datainterface.eastmoney.com/EM_DataCenter/JS.aspx?type=FD&sty=MTE&mkt=1&code=600000&st='.$i.'&sr='.$i.'&p='.$i.'&ps=25';
$test = file_get_contents($url);
if($test==''){
$test = file_get_contents($url);
}
echo $url.'<br>'.$test."<br><br><br>";
}