Display the most recent entries on the Twitter public timeline.
herlooseThu Feb 23 01:07:13
konlongtochiThu Feb 23 01:07:13
DovSeidmanThu Feb 23 01:07:12
euge_iThu Feb 23 01:07:12
TANUNU_23Thu Feb 23 01:07:12
makiyuiThu Feb 23 01:07:12
JoacoMarencoThu Feb 23 01:07:12
leejennyjhThu Feb 23 01:07:12
Kennedy_KREAMThu Feb 23 01:07:12
KhafiiiThu Feb 23 01:07:12
LafsKOCOThu Feb 23 01:07:12
luisfonseca28Thu Feb 23 01:07:12
eusou_joaotThu Feb 23 01:07:12
summerballparkThu Feb 23 01:07:11
ThaCharlesIVThu Feb 23 01:07:11
Keep_calm_kingThu Feb 23 01:07:11
JesusShuttles34Thu Feb 23 01:07:11
Gideon_WarriorThu Feb 23 01:07:11
<?php
$ul = qp('<?xml version="1.0"?><ul/>');
$url = 'http://twitter.com/statuses/public_timeline.xml';
$tpl = '<li>
<div style="height: 55px">
<img style="float:left" width="50" height="50" src="@img"/>
<strong>@uname</strong><em>@ts</em><br/>
@txt
</div>
</li>';
foreach (qp($url, 'status') as $status) {
$data = array();
$data['@ts'] = substr($status->children('created_at')->text(), 0, 20);
$data['@txt'] = filter_xss_admin($status->next('text')->text());
$data['@uname'] = htmlentities($status->parent()->find('user>screen_name')->text());
$data['@img'] = $status->next('profile_image_url')->text();
$data = strtr($tpl, $data);
$ul->append($data);
}
$out .= $ul->html();
?>