찾기
내용으로 건너뛰기
추적
문서의 이전 판을 선택했습니다!
저장하면 이 자료로 새 판을 만듭니다.
미디어 파일
======심플파이 (Simplepie) - RSS리더====== RSS를 긁어올 수 있는 오픈소스임. 설정이 간편하지만 기능은 막강함. * [[http://simplepie.org/|simple pie]] <code php><?php $feed_no=7; //갯수 include_once('./sp/autoloader.php'); // 심플파이 가져오기. include_once('./sp/idn/idna_convert.class.php'); $feed2 = new SimplePie(); //객체 생성 $feed2->set_feed_url('http://feeds.feedburner.com/VLBB'); //주소 설정 if (!empty($_GET['force']) && $_GET['force'] ===== 'true') { $feed2->force_feed(true);} $success = $feed2->init(); //실행! $feed2->handle_content_type(); //처리! ?> <div class="rss_recent" > <?php if ($success): ?> <div class=" " align="center"> <h3 class="header"><?php if ($feed2->get_link()) echo '<a href="' . $feed2->get_link() . '">'; echo $feed2->get_title(); if ($feed2->get_link()) echo '</a>'; ?></h3> </div> <center> <table > <!-- Let's begin looping through each individual news item in the feed. --> <?php foreach($feed2->get_items(0,$feed_no) as $item): ?> <tr class="" > <td class="ellips" title="<?php echo $item->get_content(); //Display the item's primary content.?>"><?php if ($item->get_permalink()) echo '<a class="ellips" href="' . $item->get_permalink() . '">'; echo (mb_strlen($item->get_title(),"UTF-8")>25)?mb_substr($item->get_title(),0,25,"UTF-8").'...':$item->get_title(); if ($item->get_permalink()) echo '</a>'; ?></td><td class="footnote"><?php echo $item->get_date('j M Y, g:i a'); ?></td> </tr> <?php endforeach; ?> <?php endif; ?> </table></center> </div></code> ===== 속도===== 좀 느린 것 같다. 피드 두개 불러오는데 1초 걸림..캐쉬도 있는데... ^ Magpie ^ Simplepie ^ | Light Weight | Too Many Files. | | Simple Implementation | Complex Implemenation | | Easy to modify | Difficult to modify. | | Less time to parse | Delay in parsing. | | Less documentation but enough | Good documented. | ====Cache==== $feed->set_cache_location('mysql://username:password@hostname:port/database'); ^ 캐쉬 방법 ^ 속도 테스트 ^ | flatfile | 0.658 seconds in processing this page. | | mysql | 0.149 seconds in processing this page. | 훨씬 빠른 mysql을 쓰도록 함. {{tag>simplepie freeware php opensource 라이브러리}}
저장
미리 보기
취소
편집 요약
참고: 이 문서를 편집하면 내용은 다음 라이선스에 따라 배포하는 데 동의하는 것으로 간주합니다:
CC Attribution-Noncommercial-Share Alike 4.0 International
연결문서
기술
문서 도구
문서 보기
이전 판
연결문서
맨 위로
다크 모드로 보기
☀️
Toggle Menu
기술
너두 고쳐두 됩니다.
사이트 도구
최근 바뀜
미디어 관리자
사이트맵
사용자 도구
등록
로긴
최근 수정된 문서
tesa
[⚠️ 합병증 및 주의사항]
수술적_정자채취법
[현재]
남성불임
[진단]
역행성_사정
bald_head
[먹는 약]
자연임신확률
vt-d
[VT-d]
cpu
isotretinoin
[남성 주의사항]
불륜
[증거]
타바코씨_처럼_이혼
외도
[밥 투정하다 이혼한 슬픈 이야기... (2ch)]
친자확인
[친자확인]
vaginal_candidiasis
[증상]
도쿠위키
test
만듦
엑소크래프트