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();
?>
最新のブログ記事(新着順)
- 15000以上のいい感じの線形アイコン「Lineicons」
- CSSやTailwindでのCSSスニペットライブラリ「CSS Snippets Library」
- AIを使ってサイトマップが作れる「Octopus.do」
- ライブラリ依存のないモーダルオープンライブラリ「Blendy」
- 個性的な明朝フリーフォント「築豊初号明朝OFL」
- CSSで太陽が差し込むようなアニメーション実装
- 可愛くアニメーションする「beautifully crafted animated icons」
- アイソメトリックなアイコンがアイコンがPNG,SVGでゲットできる「Isoicons」
- ユニークなカタカナフォントtorisippo
- 美しいメッシュグラデーションをCSSで簡単に取得できる「MSHR」
- 過去のエントリ