Skip to content

Instantly share code, notes, and snippets.

@hiroshikuze
Created December 14, 2019 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiroshikuze/8f9da70dc3e12f5423c39ba4248fa2ce to your computer and use it in GitHub Desktop.
Save hiroshikuze/8f9da70dc3e12f5423c39ba4248fa2ce to your computer and use it in GitHub Desktop.
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