컴퓨터잡담

rss리더기

by 디케 posted Mar 12, 2010
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄


<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 


<style>

.linkstyle {font-size:12px;color:#999999;text-decoration:none;}



</style>

<?


include "rss.php";

switch($url)

{

// ****************** uuu=1번 ***************

case '1' :

$url="http://www.daum.net/rss.xml"; //전체

break;

case '2' :

$url="http://www.daum.net/pub/rss_news.xml"; //뉴스

break;

case '3' :

$url="http://www.daum.net/pub/rss_sports.xml"; //스포츠

break;

case '4' :

$url="http://www.daum.net/pub/rss_entertain.xml"; //연예

break;

case '5' :

$url="http://www.daum.net/pub/rss_agora.xml"; //아고라

break;

case '6' :

$url="http://www.daum.net/pub/rss_community.xml"; //커뮤니티

break;

case '7' :

$url="http://www.daum.net/pub/rss_movies.xml"; //동영상

break;

case '8' :

$url="http://media.daum.net/rss/today/primary/all/rss2.xml"; //미디어종합

break;

case '9' :

$url="http://media.daum.net/rss/today/primary/entertain/rss2.xml"; //미디어연예

break;

case '10' :

$url="http://media.daum.net/rss/today/primary/sports/rss2.xml"; //미디어스포츠

break;

case '11' :

$url="http://media.daum.net/rss/part/primary/society/rss2.xml"; //분야별 사회

break;

case '12' :

$url="http://media.daum.net/rss/part/primary/politics/rss2.xml"; //분야별 정치

break;

case '13' :

$url="http://media.daum.net/rss/part/primary/economic/rss2.xml"; //분야별 경제

break;

case '14' :

$url="http://media.daum.net/rss/part/primary/economic/rss2.xml"; //분야별 국제

break;

case '15' :

$url="http://media.daum.net/rss/part/primary/culture/rss2.xml"; //분야별 문화생활

break;

case '16' :

$url="http://media.daum.net/rss/part/primary/entertain/rss2.xml"; //분야별 연예

break;

case '17' :

$url="http://media.daum.net/rss/part/primary/digital/rss2.xml"; //분야별 IT과학

break;

case '18' :

$url="http://media.daum.net/rss/today/hotissue/rss2.xml"; //분야별 오늘의 핫테마

break;

case '19' :

$url="http://media.daum.net/rss/today/photo/rss2.xml"; //분야별 오늘의 포토갤러리

break;

case '20' :

$url="http://media.daum.net/rss/today/tvnews/rss2.xml"; //분야별 오늘의 tv뉴스

break;

case '21' :

$url="http://bbs3.agora.media.daum.net/gaia/do/story/rss/agreeBasedBestArticleContent?bbsId=total"; //아고라베스트

break;

case '22' :

$url="http://bbs1.agora.media.daum.net/gaia/do/rss/list?bbsId=D003"; //아고라 자유토론

break;

case '23' :

$url="http://bbs1.agora.media.daum.net/gaia/do/rss/list?bbsId=D101"; //아고라 정치

break;

case '24' :

$url="http://bbs1.agora.media.daum.net/gaia/do/rss/list?bbsId=D115"; //아고라 경제

break;

case '25' :

$url="http://cartoon.media.daum.net/series/rss/kol.xml"; // 연제 만화

break;

case '26' :

$url="http://bloggernews.media.daum.net/best/rss"; //블로거 베스트

$lang="utf-8";

break;

case '27' :

$url="http://bloggernews.media.daum.net/ch/all/rss"; //블로그 채널별

$lang="utf-8";

break;

case '28' :

$url="http://aggregate.movie.daum.net/provider/rss/feature.xml"; //영화 기획특집

break;

case '29' :

$url="http://aggregate.movie.daum.net/provider/rss/review.xml"; //영화 리뷰

break;

case '30' :

$url="http://aggregate.movie.daum.net/provider/rss/people.xml"; //영화 피플

break;

case '31' :

$url="http://aggregate.movie.daum.net/provider/rss/futureshow.xml"; //개봉예정작

break;

case '32' :

$url="http://aggregate.movie.daum.net/provider/rss/netizenReview.xml"; //영화 네티즌리뷰

break;

case '33' :

$url="http://miznet.daum.net/rss/talk/cooking.xml"; //미즈넷 나만의 요리비법

$lang="utf-8";

break;

case '34' :

$url="http://miznet.daum.net/rss/talk/household.xml"; //미즈넷 알뜰살림 노하우

$lang="utf-8";

break;

case '35' :

$url="http://miznet.daum.net/rss/talk/lovetalk.xml"; //미즈넷 사랑과 이별

$lang="utf-8";

break;

case '36' :

$url="http://miznet.daum.net/rss/talk/weddingtalk.xml"; //미즈넷 결혼준비 A-Z

$lang="utf-8";

break;

case '37' :

$url="http://miznet.daum.net/rss/talk/coupletalk.xml"; //미즈넷 부부토크

$lang="utf-8";

break;

case '38' :

$url="http://miznet.daum.net/rss/talk/womantalk.xml";  //미즈넷 희노애락

$lang="utf-8";

break;

case '39' :

$url="http://miznet.daum.net/rss/talk/pregnance.xml"; //미즈넷 임신/출산/산후조리

$lang="utf-8";

break;

case '40' :

$url="https://gorecruit.daum.net/recruit/rss"; //채용공고

$count=10;

break;

}


if(!$count) $count=100;

if(!$cutstr) $cutstr=100;

if(!$encode) $encode="";

$a=RSS_reader($count,$cutstr,$url,$encode);


//for($i=1;$i<count($a);$i++)

// {

// if($lang) $a[$i] = iconv('euc-kr','utf-8',$a[$i]);

// if($a[$i]) $cont .= $a[$i];

// }


for($i=1;$i<11;$i++)

{

// if($lang) echo iconv('euc-kr','utf-8',$a[$i]);

// if(!$lang) echo $a[$i];


if(ereg('"',$a[$i])) $a[$i]=str_replace('"','',$a[$i]);

if($lang) $a[$i] = iconv('euc-kr','utf-8',$a[$i]);

if($a[$i]) $cont .= $a[$i];

}


for($i=101;$i<111;$i++)

{

// if($lang) echo iconv('euc-kr','utf-8',$a[$i]);

// if(!$lang) echo $a[$i];


if(ereg('"',$a[$i])) $a[$i]=str_replace('"','',$a[$i]);

if($lang) $a[$i] = iconv('euc-kr','utf-8',$a[$i]);

if($a[$i]) $cont .= $a[$i];

}


echo $cont;

//$cont="<a href='http://tvnews.media.daum.net/view.html?cateid=100000&newsid=20100312081512998&p=sbsi' class="linkstyle">공개된 소지품 살펴보니..또 한번 가슴 철렁</a><br/><a href='http://tvnews.media.daum.net/view.html?cateid=100000&newsid=20100312032504198&p=ytni' class='linkstyle'>칠레서 규모 7.2 여진..쓰나미 경보 발령</a><br/><a href='http://tvnews.media.daum.net/view.html?cateid=100000&newsid=20100312032105145&p=ytni' class='linkstyle'>침통에 빠진 송광사..영결식도 무소유</a><br/><a href='http://tvnews.media.daum.net/view.html?cateid=100000&newsid=20100312043304206&p=ytni' class='linkstyle'>라이터로 이불 실밥 태우다 빌라 화재</a><br/>";

$cont=str_replace("\n",'',$cont);


?>


<html> 

<head> 

<script type="text/javascript"> 

function changeMsg(){ 

        document.getElementById("cont").innerHTML="<?=$cont?>"; 

</script> 

</head> 

<body> 

<div id="cont"><!-- 이곳에 텍스트가 출력됩니다. --></div> 

</body> 

</html>