RSS 2.0

RSS 2.0

공식배포처 - http://blogs.law.harvard.edu/tech/rss/

태그사용예
XML 버전< ?xml version="1.0" ?>
RSS 시작< rss version="2.0" >
채널 시작< channel>
채널 제목< title> 제목< /title>
채널 링크< link>http://ngio.co.kr< /link>
채널 내용< description>와니의 홈페이지< /description>
게시글 시작< item>
게시글 제목< title>xml 페이지 구현< /title>
게시글 링크< link>http://ngio.co.kr/page.ppg?codep=12978391823< /link>
게시글 내용< description>우리에게 중요한 것은 적금통장이 아니라 '적심통장'이다.< /description>
게시글 일자< pubDate>Tue, 03 Jun 2006 23:12:39 GMT< /pubDate>
게시글 끝< /item>
채널 끝< /channel>
RSS 끝< /rss>
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2006/11/23 18:17 2006/11/23 18:17
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2105

update_xml()

function update_xml() {
global $db, $dbid, $p_user_nick, $p_title, $p_description, $s_root_path, $r_root_path, $attach_path, $s_attach_path, $r_attach_path, $p_xml_cnt, $p_rss_public;

list($st, $header, $body, $lmdate, $xmlinfo) = xml_parser($s_root_path."index.xml","");
if ($xmlinfo) {
list($stitle, $slink, $sdesc) = str_dbi_check(get_siteinfo($xmlinfo));
}

if (trim($slink)) $s_root_path = str_replace("index.php", "", $slink);

$p_title = htmlspecialchars($p_title);
$p_description = htmlspecialchars(str_tag_truncate($p_description));
$rtime = get_rss_stamp(time());

$rss .= "\r\n";
$rss .= "\r\n";
$rss .= "\r\n";
$rss .= "$p_title\r\n";
$rss .= "$s_root_path"."index.php\r\n";
$rss .= "$p_description\r\n";
$rss .= "ko\r\n";
$rss .= "$rtime\r\n";

$sql = "
select
no, category1, category2, title, body,
user_id, image_file_path1, image_file_path2, regdate
from
t3_".$dbid."
where
is_public = '1'
order by
regdate desc
limit 0, $p_xml_cnt
";
$result = @mysql_query($sql);
while(list(
$no, $category1, $category2, $title, $body,
$user_id, $image_file_path1, $image_file_path2, $regdate
) = @mysql_fetch_array($result)) {

$category = get_category1_label($category1);
if ($category2) $category .= " - ".get_category2_label($category2);

$title = htmlspecialchars($title);
$link = htmlspecialchars($s_root_path."index.php?pl=$no");

if ($p_rss_public) {
$description =
" nl2brc(
autolink(
set_body(
attach_image(0, $body, $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2)
)
)
)
, $no)."]]>";
} else {
if (strlen($body) > 240) $add_desc = " >> 글 전체보기";
else $add_desc = "";
$description = "";
}

$regdate = get_rss_stamp($regdate);
$creator = htmlspecialchars($user_id);

$rss .= "\r\n";
$rss .= "$title\r\n";
$rss .= "$link\r\n";
$rss .= "$description\r\n";
$rss .= "".htmlspecialchars($category)."\r\n";
$rss .= "$creator\r\n";
$rss .= "$regdate\r\n";
$rss .= "
\r\n";
}

$rss .= "
\r\n";
$rss .= "
";

$out = fopen($r_root_path."index.xml", "w");
@chmod($r_root_path."index.xml", 0777);
fwrite($out, $rss);
fclose($out);
}
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2006/11/23 17:06 2006/11/23 17:06
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2104

iconv

받기 경로 : http://ftp.gnu.org/pub/gnu/libiconv


#tar xzf liiconv-1.9.1.tar.gz
#cd libiconv-1.9.1
#./configure --prefix=/usr/lib //설치하고자 하는 디렉토리
#make
#make install
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2006/11/23 16:14 2006/11/23 16:14
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2102


블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2006/11   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Statistics Graph

Site Stats

Total hits:
251076
Today:
1055
Yesterday:
295