如何通过PHP+;MySQL

如何通过PHP+;MySQL,php,mysql,twitter,hashtag,Php,Mysql,Twitter,Hashtag,我正在开发一个php页面,其中显示了几个标签的tweet,假设#apple#iphone将显示该标签的所有最新tweet 我希望在PHP和MySQL中使用它。不知道如何使用Twitter流API 我是否需要创建缓存并将其存储到MySQL中,或者我可以在特定的标签上显示最近的100条推文。我还听说调用twitter api有一些限制。使用twitter api atom提要,您可以通过以下url的标签检索 http://search.twitter.com/search.atom?q=%23app

我正在开发一个php页面,其中显示了几个标签的tweet,假设#apple#iphone将显示该标签的所有最新tweet

我希望在PHP和MySQL中使用它。不知道如何使用Twitter流API


我是否需要创建缓存并将其存储到MySQL中,或者我可以在特定的标签上显示最近的100条推文。我还听说调用twitter api有一些限制。

使用twitter api atom提要,您可以通过以下url的标签检索

http://search.twitter.com/search.atom?q=%23apple&rpp=100
我想列出最近的推文,在一个关键字列表(数组)(哈希标签)上。我该怎么做。。?有一些API,称为Twitter流API,但我不知道如何使用它。@marvin,你有什么完整的教程可以推荐吗。。请允许我显示推文。。有关特定的标签,请参阅。
$feed = "http://search.twitter.com/search.atom?q=%23apple&rpp=100";
$xml = simplexml_load_file($feed);
foreach($xml->entry  as $id => $entry)
{
   //do what you want here,
   //some (definitely not all) available values are
   $linkToTweet = $entry->link[0]["href"];
   $linkToAvatar = $entry->link[1]["href"];
   $timestamp = $entry->updated;
   $tweet = $entry->content;
}