我想编写一个函数来获取指定用户的所有推文,但它最近只返回20个.
我想出了类似的东西:
function getTweets($user) {
$page = file_get_contents("http://twitter.com/{$user}");
$from = strpos($page, "<ol id='timeline' class='statuses'>");
$to = strpos($page, "</ol>");
$length = $to - $from;
$page =substr($page, $from, $length);
echo $page;
}
getTweets('user_name');
Run Code Online (Sandbox Code Playgroud)
有没有办法绕过那个?