PHPからRSSを手軽に作成するライブラリ: RSSWriter
2006年02月06日
RSSWriter is a convenience class for generating RSS 1.0 feeds with PHP.
RSSWriterを使えば、RSSの詳しいフォーマットについて知らなくても、手軽にRSS1.0 feedを作成することが出来ます。
クラスの形式でライブラリ化されているので、自作のツールに組み込むのも容易です。
サンプルは次のような感じ。
<?php
include("rss10.inc");
$rss=new RSSWriter("http://www.example.org/",
"Example Site",
"The best examples out there.",
array(
"dc:publisher" => "Example Publishing Inc.",
"dc:creator" => "E X Ample <me@example.org>"
)
);
$rss->setImage("http://www.example.org/images/rss.gif", "Example Site: All the Examples Fit to Print");
$rss->addItem("http://www.example.org/page1.html", "First Example Page");
$rss->addItem("http://www.example.org/page2.html", "Second Example Page",
array(
"description" => "This is the second page of examples on this wonderful site",
"dc:subject" => "examples",
"dc:creator" => "Fred <fred@example.org>"
)
);
$rss->serialize();
?>
投稿者 KJ : 2006年02月06日 15:03
|
![]()
間違いの指摘をしていただける方はメールでお願いします
最新のブログ記事
- Facebook風のサムネイル付きサジェストボックスを実装するサンプル
- 2009年7月3日 管理人のブックマーク
- PHPとCSSで動的に綺麗なパーセンテージグラフを描画サンプル
- 普通の写真をすばらしいアートにするためのPhotoshopチュートリアル集
- シマシマの見やすいテーブルを作成するMooToolsプラグイン「ZebraTable」
- 2009年7月2日 管理人のブックマーク
- 「フォローしてね」を表すTwitterアイコン集
- シンプルなTwitter検索を行うためのPHPスクリプト
- PHPのcURLを使ってできる便利なサンプル集
- 2009年7月1日 管理人のブックマーク
- iPhone3.0の緯度経度APIで移動履歴を地図描画するサンプル





















