Toggle main menu visibility
新聞
下載
教材
影音
討論
其他選單
好站連結
行事曆
電子相簿
常見問題
萬用表單
即時留言簿
友站消息
社大學員
:::
登入
登入
帳號
密碼
登入
重整畫面
:::
所有書籍
「[991]PHP網站開發 進階應用技巧2」目錄
MarkDown
17. 讀取RSS
1. 網頁多媒體
2. Superfish下拉選單
2-1 index.php(遞迴範例)
3. 連動選單
3-1 menu1.php
3-2 menu2.php
3-3 menu1.php(索引與值都相同的精簡寫法)
3-4 demo/index.php
4. 表格內容排序
4-1 index.php
5. 拉動表格進行排序
5-1 index.php
5-2 checkbox.html
6. 即時聊天系統
6-1 index.php
7. PHP檔案操作(上)
7-1 index.php
7-2 iconize_l.css
8. PHP檔案操作(下)
8-1 index.php
8-2 index.php 中文目錄修正
9. 相片EXIF資訊及上傳
9-1 index.php
10. 目錄管理及相片特效
10-1 index.php
10-2 exif.php
11. 多媒體RSS
11-1 index.php
11-2 mrss.php
12. 樹狀目錄+HTML5
12-1 index.php
12-2 dtree.js
13. DHX入門(上)
13-1 index.php
13-2 index2.php
13-3 index3.php
13-4 index4.php
14. DHX編輯器及選單
14-1 index.php
14-2 input.php
14-3 setup.php
14-4 list.php
14-5 view.php
14-6 menu.xml
15. 點擊編輯
15-1 index.php
15-2 save.php
16. curl網頁採集
16-1 index.php
16-2 test1.php
17. 讀取RSS
17-1 index.php
18. 無刷新登入
18-1 index.php
18-2 login.php
18-3 index.php(AJAX版)
18-4 login.php(AJAX版)
18. 無刷新登入
\[991\]PHP網站開發 進階應用技巧2 ====================== <?php require\_once "simplepie.inc";
$rss\_url\[\] = 'http://www.mobile01.com/rss/newtopics.xml'; $rss\_url\[\] = 'http://tw.news.yahoo.com/rss/realtime'; $rss\_url\[\] = 'http://udn.com/udnrss/BREAKINGNEWS1.xml';
$feed = new SimplePie(); $feed->set\_feed\_url($rss\_url); $feed->init(); $feed->handle\_content\_type();
$feed->set\_item\_limit(10);
$web\_title= $feed->get\_title(); $web\_link= $feed->get\_link(); $items= $feed->get\_items(
0,10
); foreach ($items as $item){
$web\_title=$item->get\_feed()->get\_title(); $web\_link=$item->get\_feed()->get\_link();
$title=$item->get\_title();
$url
=$item->get\_link();
$date
=$item->get\_date("Y-m-d H:i:s");
$desc
=$item->get\_description(); $all\_title.="<li>
\[<a href='$web\_link'>$web\_title</a>\]
<b><a href='
$url
' style='color:#202020;text-decoration:none;'>
$title
</a></b> <span style='color:#0099ff;font-size:12px;'>({
$date
})</span> <div style='color:gray;font-size:12px;margin-bottom:6px;'>
$desc
</div>
</li>"; } $main=" <div align='center'> <h1>$web\_title</h1> <a href='$web\_link'>$web\_link</a> </div> <ol> $all\_title </ol> "; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel='stylesheet' href='style.css' type='text/css' /> <title></title> <script type="text/javascript" language="javascript" src="lytebox.js"></script> <link rel="stylesheet" href="lytebox.css" type="text/css" media="screen" /> </head> <body> <div id='news' style='width:500px;'> <?php echo $main; ?> </div> </body> </html>
:::
搜尋
search
進階搜尋
QR Code 區塊
快速登入
所有討論區
「PHP全端開發」線上課程討論區
XOOPS使用討論區
一般研習學員
社大學員專用
路過哈啦區
XOOPS佈景設計
XOOPS模組開發
Tad書籍區
即時留言簿
書籍目錄
展開
|
闔起
線上使用者
87
人線上 (
35
人在瀏覽
線上書籍
)
會員: 0
訪客: 87
更多…