Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MagpieRSSとRSSreaderlib ( https://kuje.kousakusyo.info/tools/RSSreaderlib/ )を用いてtwitter記事を取り込む(2010/04/11現在)
<?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
You can’t perform that action at this time.