// 必要なライブラリの読み込み
require_once("xml_read_class.php");
$xmlPath = $_REQUEST["url"];
$viewListNum = $_REQUEST["viewNum"];
// XMLファイルの読み込み
$_xml_set = new Xml_Read( $xmlPath );
$Val = $_xml_set->get_Xml_Value_I();
$buff = "
\n";
for($i=0; $i<$viewListNum; $i++){
if($Val[$i]){
if($Val[$i]["link"]){
$buff .= " ".$Val[$i]["date"]."
".$Val[$i]["topic"]."
\n";
}else{
$buff .= " ".$Val[$i]["date"]."
".$Val[$i]["topic"]."
\n";
}
}
}
$buff .= "
";
$buff2 = mb_convert_encoding($buff, "EUC-JP", "UTF-8");
header("content-type: text/xml; charset=EUC-JP");
print($buff2."\n");
function reDate($date){
$dval = substr($date, 0, 10);
$dval = strtr($dval, "-", "/");
return $dval;
}
?>