Created
December 14, 2019 12:13
-
-
Save hiroshikuze/8f9da70dc3e12f5423c39ba4248fa2ce to your computer and use it in GitHub Desktop.
Google Newsを利用して無線ルーターニュースを取得する(2010-07-18現在)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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">>>提供:Googleニュース</a><br/> | |
</li> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment