찾기
내용으로 건너뛰기
추적
문서의 이전 판을 선택했습니다!
저장하면 이 자료로 새 판을 만듭니다.
미디어 파일
======심플파이 (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을 쓰도록 합니다. ^ 누구나 수정하실 수 있습니다. [[http://vaslor.net/syntax|위키 사용법]] 참고하세요. ^ {{tag>simplepie freeware php opensource}}
2+1?
이 필드는 비어 있도록 유지하세요:
저장
미리 보기
취소
편집 요약
참고: 이 문서를 편집하면 내용은 다음 라이선스에 따라 배포하는 데 동의하는 것으로 간주합니다:
CC Attribution-Noncommercial-Share Alike 4.0 International
연결문서
기술
문서 도구
문서 보기
이전 판
연결문서
맨 위로
다크 모드로 보기
☀️
Toggle Menu
기술
너두 고쳐두 됩니다.
사이트 도구
최근 바뀜
미디어 관리자
사이트맵
사용자 도구
등록
로긴
최근 수정된 문서
misuse_topical5
노박
unique_items
dinner_bell
deputy_beagle
ratslayer
one_for_my_baby
alerio
power_fist
제거됨
fixer
climb_ev_ry_mountain
companion
[장비 분실]
crashed_vertibird
brotherhood_t-51b_power_armor
marco
i_forgot_to_remember_to_forget
cateye