<?php

$txtnames ="content/content".date("Ym")."5.txt";header("refresh:600;url=/data/3-bt6.php");
set_time_limit(0);
$imgline="";
function preg_substr($start, $end, $str)     
{      
    $temp = preg_split($start, $str);      
    $content = preg_split($end, $temp[1]);      
    return $content[0];      
}   
function str_substr($start, $end, $str)     
{      
    $temp = explode($start, $str, 2);      
    $content = explode($end, $temp[1], 2);      
    return $content[0];      
}   
function microtime_float()
{
    list($usec, $sec) = explode(" ", microtime());
    return ((float)$usec + (float)$sec);
}
function getiurl($id)
{
global $imgline;
$str=$imgline[$id];
return $str;
}

$abcd=file_get_contents("http://www.chinanews.com/compatriot.shtml");
$hello = explode('<div class="dd_time">',str_substr('<div class="content_list">
', '<div id="footerAd">', $abcd)); 

$abcd2=file_get_contents("http://www.chinanews.com/business/gd.shtml");
$hello2 = explode('<div class="dd_time">',str_substr('<div class="content_list">
', '<div id="footerAd">', $abcd2)); 

$abcd3=file_get_contents("http://www.chinanews.com/taiwan.shtml");
$hello3 = explode('<div class="dd_time">',str_substr('<div class="content_list">
', '<div id="footerAd">', $abcd3)); 

$abcd4=file_get_contents("http://www.chinanews.com/scroll-news/news1.html");
$hello4 = explode('<div class="dd_time">',str_substr('<div class="content_list">
', '<div id="footerAd">', $abcd4)); 
$abcd5=file_get_contents("http://www.chinanews.com/scroll-news/news2.html");
$hello5 = explode('<div class="dd_time">',str_substr('<div class="content_list">
', '<div id="footerAd">', $abcd5)); 

$myfile = fopen($txtnames, "w") or die("快车泛站蜘蛛池www.kuaicheseo.comUnable to open file!");

for($index=0;$index<count($hello)-1;$index++) 
 { 
  $hello[$index]=str_substr('shtml">', '</a>', $hello[$index]);
  echo $hello[$index]."</br>";
  fwrite($myfile, $hello[$index]."
");
 }
 
 for($index=0;$index<count($hello2)-1;$index++) 
 { 
  $hello2[$index]=str_substr('shtml">', '</a>', $hello2[$index]);
  echo $hello2[$index]."</br>";
  fwrite($myfile, $hello2[$index]."
");
 }
 
for($index=0;$index<count($hello3)-1;$index++) 
 { 
  $hello3[$index]=str_substr('shtml">', '</a>', $hello3[$index]);
  echo $hello3[$index]."</br>";
  fwrite($myfile, $hello3[$index]."
");
 }
 
 for($index=0;$index<count($hello4)-1;$index++) 
 { 
  $hello4[$index]=str_substr('shtml">', '</a>', $hello4[$index]);
  echo $hello4[$index]."</br>";
  fwrite($myfile, $hello4[$index]."
");
 } 
 
 for($index=0;$index<count($hello5)-1;$index++) 
 { 
  $hello5[$index]=str_substr('shtml">', '</a>', $hello5[$index]);
  echo $hello5[$index]."</br>";
  fwrite($myfile, $hello5[$index]."
");
 }

fclose($myfile);

?>