Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Google Newsを利用して無線ルーターニュースを取得する(2010-07-18現在)
<li class="widget">
<h3>無線ルーターニュース</h3>
<?php
require_once "/var/www/vhosts/kuze.tsukaeru.jp/(RSSreaderlib.php の保存先を指定)";
$temp = "/var/www/vhosts/kuze.tsukaeru.jp/httpdocs/store/temp";
$RSSReader = new RSSReader(CALL_MAKE_TEMPFILE_FOLDER, $temp);
$RSSReader -> RSSReader(
'utf-8',
'/var/www/vhosts/kuze.tsukaeru.jp/httpdocs/(MagpieRSS/rss_fetch.inc の保存先を指定)',
'http://news.google.com/news?hl=ja&ned=us&ie=UTF-8&oe=UTF-8&output=rss&q=%e7%84%a1%e7%b7%9aLAN'
);
$max = ($RSSReader -> getContentsCount() > 5) ? 5: $RSSReader -> getContentsCount();
for($i = 0; $i < $max; $i++) {
echo " <span class=\"selectedcategory\"><a href=\"".$RSSReader -> getContentsURL($i)."\">".$RSSReader -> getContentsTITLE($i)."</a></span><br/>\n";
}
?>
<hr/>
<a href="http://news.google.co.jp/" target="_top" rel="nofollow">&gt;&gt;提供:Googleニュース</a><br/>
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.