phpでrssの情報を抜き出したい場合は、titleやlinkの要素は以下の通りで抜き出せます。
<?php // Load and parse the XML document
$rss = simplexml_load_file('http://partners.userland.com/nytRss/nytHomepage.xml');
$title = $rss->channel->title;
?>
…
htmlファイルでphpを動かすための.htaccessファイルの設定
.htaccessファイル内に以下の行を記述します。
AddType application/x-httpd-php .htm .html
当然の前提条件として、htaccessの動作が許可されているサーバに限ります。
graffiti on the web
この投稿へのコメント
コメントはまだありません。