Last active
December 14, 2019 13:07
-
-
Save hiroshikuze/bea3159232e359ad21e7f00adfb7023e to your computer and use it in GitHub Desktop.
MagpieRSSとRSSreaderlib ( https://kuje.kousakusyo.info/tools/RSSreaderlib/ )を用いてtwitter記事を取り込む(2010/04/11現在)
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
<?php | |
RSSReader(CALL_MAKE_TEMPFILE_FOLDER, $temp); | |
$TwitterReader -> RSSReader( | |
'sjis', | |
'(MagpieRSSのrss_fetch.inc設置先)', | |
'http://twitter.com/statuses/user_timeline/19641481.rss' | |
); | |
$max = ($TwitterReader -> getContentsCount() > 5) ? 5: $TwitterReader -> getContentsCount(); | |
for($i = 0; $i < $max; $i++) { | |
$comment = str_replace("hiroshikuze: ","",$TwitterReader -> getContentsTitle($i)); | |
if(strlen($comment) > 70) { $comment = substr($comment, 0, 50)."...".substr($comment, -10); } | |
echo " <li><a href="\"".$TwitterReader" -=""> getContentsURL($i)."\">".$comment."</a> [".date("y/m/d H:i.s", $TwitterReader -> getContentsTimestamp($i))."]</li>\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment