有没有办法从 Twitter 用户那里获取推文总数?我只想显示推文的数量,我尝试过这样,但我总是得到 0:
<?php
$twit = file_get_contents('http://twitter.com/users/show/matejlatin.xml');
$begin = '<statuses_count>'; $end = '</statuses_count>';
$page = $twit;
$parts = explode($begin,$page);
$page = $parts[1];
$parts = explode($end,$page);
$tcount = $parts[0];
if($tcount == '') { $tcount = '0'; }
echo '<h3 id="tweets">'.$tcount.'</h3>';
?>