xml 데이타와 링크를 자동으로 지정한 게시판에서 가져오려면 어떻게 합니까? 정보
xml 데이타와 링크를 자동으로 지정한 게시판에서 가져오려면 어떻게 합니까?본문
<?xml version="1.0" encoding="euc-kr" standalone="no"?>
<MOVIE_MAIN>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_v9MgcYQP_3434-1.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5605]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_fj7YwBnm_AD_42-0.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5604]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_CrHylFmE_DSC_2.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5603]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_l0JOkxLs_DSC_2767-0.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5602]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_orPDFNUG_AB_249.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5601]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
</MOVIE_MAIN>
<MOVIE_MAIN>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_v9MgcYQP_3434-1.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5605]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_fj7YwBnm_AD_42-0.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5604]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_CrHylFmE_DSC_2.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5603]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_l0JOkxLs_DSC_2767-0.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5602]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
<data>
<imgUrl><![CDATA[http://58.120.135.228:9000/gnu/data/file/gallery/1217947490_orPDFNUG_AB_249.jpg]]></imgUrl>
<imgLink target="_self"><![CDATA[http://58.120.135.228:9000/gnu/bbs/board.php?bo_table=gallery&wr_id=5601]]></imgLink>
<colorRGB>0x5FA8E4</colorRGB>
</data>
</MOVIE_MAIN>
댓글 전체
rss부러오는것처럼 하면되지 않을까요?
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
$img_x = '500'; //큰 썸네일 가로길이
$img_y = '300'; //큰 썸네일 세로길이
$img_q = '90'; //퀼리티 100이하로 설정
?>
<?
######################환경변수#########################
$xml_dir = ""; // 신규생성할 디렉토리 변수
$xml_path = "$latest_skin_path/main_visual_select.xml"; // 신규생성할 xml 파일
$laguage_ = "euc-kr";
#######################################################
$xml_file = fopen($xml_path, "w+");
//파일이 존재하지 않는다면 신규생성한다.
if(!$xml_file){
fwrite($xml_file, "");
fclose($xml_file);
@chmod($xml_path, 0707);
}
$data[xml_start] = "<MOVIE_MAIN>";
$data[xml_end] = "</MOVIE_MAIN>";
$get_xml .= "<?xml version='1.0' encoding='euc-kr' standalone='no'?>";
$get_xml .= $data[xml_start];
$count_num = 5;
for ($i=0; $i<count($list); $i++) {
$get_xml .= "<data>";
$file= $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$file1= $list[0][file][0][path] .'/'. $list[0][file][0][file];
$img= thumbnail($file, $img_x, $img_y, 0, 2, $img_q, "", $filter);
$get_xml .= "<imgUrl><![CDATA[$img]]></imgUrl>";
$get_xml .= "<imgLink target='_self'><![CDATA[".$list[$i][href]."]]></imgLink>";
$get_xml .= "<colorRGB>0x5FA8E4</colorRGB>";
$get_xml .= "</data>";
}
$get_xml .= $data[xml_end];
/****************************xml data end**************************/
//변환
$get_xml = iconv("EUC-KR", "UTF-8",$get_xml);
// write action
if(!fwrite($xml_file, $get_xml)) echo "file wite erro.";
// file close
fclose($xml_file);
?>
<EMBED style src="<?=$latest_skin_path?>/main_visual.swf?xmlURL=<?=$latest_skin_path?>/main_visual_select.xml" width=980 height=358 type=application/x-shockwave-flash wmode="transparent">
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("$g4[path]/lib/thumb.lib.php");
$img_x = '500'; //큰 썸네일 가로길이
$img_y = '300'; //큰 썸네일 세로길이
$img_q = '90'; //퀼리티 100이하로 설정
?>
<?
######################환경변수#########################
$xml_dir = ""; // 신규생성할 디렉토리 변수
$xml_path = "$latest_skin_path/main_visual_select.xml"; // 신규생성할 xml 파일
$laguage_ = "euc-kr";
#######################################################
$xml_file = fopen($xml_path, "w+");
//파일이 존재하지 않는다면 신규생성한다.
if(!$xml_file){
fwrite($xml_file, "");
fclose($xml_file);
@chmod($xml_path, 0707);
}
$data[xml_start] = "<MOVIE_MAIN>";
$data[xml_end] = "</MOVIE_MAIN>";
$get_xml .= "<?xml version='1.0' encoding='euc-kr' standalone='no'?>";
$get_xml .= $data[xml_start];
$count_num = 5;
for ($i=0; $i<count($list); $i++) {
$get_xml .= "<data>";
$file= $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
$file1= $list[0][file][0][path] .'/'. $list[0][file][0][file];
$img= thumbnail($file, $img_x, $img_y, 0, 2, $img_q, "", $filter);
$get_xml .= "<imgUrl><![CDATA[$img]]></imgUrl>";
$get_xml .= "<imgLink target='_self'><![CDATA[".$list[$i][href]."]]></imgLink>";
$get_xml .= "<colorRGB>0x5FA8E4</colorRGB>";
$get_xml .= "</data>";
}
$get_xml .= $data[xml_end];
/****************************xml data end**************************/
//변환
$get_xml = iconv("EUC-KR", "UTF-8",$get_xml);
// write action
if(!fwrite($xml_file, $get_xml)) echo "file wite erro.";
// file close
fclose($xml_file);
?>
<EMBED style src="<?=$latest_skin_path?>/main_visual.swf?xmlURL=<?=$latest_skin_path?>/main_visual_select.xml" width=980 height=358 type=application/x-shockwave-flash wmode="transparent">
이럻게하니 되는군요