PHP封装的Twitter访问类实例
发布时间:2020-12-12 21:00:46 所属栏目:PHP教程 来源:网络整理
导读:本篇章节讲解PHP封装的Twitter访问类。供大家参考研究。具体如下: nn"; $detail_o = " nn"; $cont_c = " n"; if ($twitter_xml = $this->api_call($twitter_id,$num_of_tweets)) { $result = $cont_o; foreach ($twitter_xml->status as $key
本篇章节讲解PHP封装的Twitter访问类。分享给大家供大家参考。具体如下: nn";
$detail_o = "
nn";
$cont_c = " n";
if ($twitter_xml = $this->api_call($twitter_id,$num_of_tweets)) {
$result = $cont_o;
foreach ($twitter_xml->status as $key => $status) {
if ($include_replies == true | substr_count($status->text,"@") == 0 | strpos($status->text,"@") != 0) {
$tweet = $this->process_links($status->text);
$result .= $tweet_o . $tweet . $tweet_c . $detail_o . date('D jS M y H:i',strtotime($status->created_at)) . $detail_c;
}
}
$result .= $cont_c;
} else {
$result .= $cont_o . $tweet_o . "Twitter seems to be unavailable at the moment." . $tweet_c . $cont_c;
}
return $result;
}
}
希望本文所述对大家的php程序设计有所帮助。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |