アーカイブ

‘xml’ タグのついている投稿

PHP での SimpleXML 処理>>RSS取得

2009 年 12 月 5 日 admin コメントはありません

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;
?>
 続きを読む...
カテゴリー: 雑記 タグ: , ,