Show Twitters

Fetch and display the public twitter feed.

Display the most recent entries on the Twitter public timeline.

  • herlooseThu Feb 23 01:07:13
    ぽえー
  • keirli14Thu Feb 23 01:07:13
    Derrick rose<3 ma man!!!!
  • konlongtochiThu Feb 23 01:07:13
    http://t.co/dmXZK7Nb Однононочники
  • DovSeidmanThu Feb 23 01:07:12
    good luck, David. Your message is very important “@DavidAgus: On the way to NYC to film The View! #endillness”
  • euge_iThu Feb 23 01:07:12
    JAJAJAJAJAJ yo sabia que me ibas a corregir!! se me safo y ni ganas de borrarlo
  • TANUNU_23Thu Feb 23 01:07:12
    I miss my Mommy!!
  • makiyuiThu Feb 23 01:07:12
    そういえばスカイツリーって航空法うんたらかんたらで紅白じゃないのね。
  • JoacoMarencoThu Feb 23 01:07:12
    Con tu pelito y tus camisas no vas a hacer nada pelotudo jajaja enloquecio
  • leejennyjhThu Feb 23 01:07:12
    Easter chocolates already? Really?
  • Kennedy_KREAMThu Feb 23 01:07:12
    My nigga snarky chillin. http://t.co/uetRp1bg
  • KhafiiiThu Feb 23 01:07:12
    Ngegalau aja? RT @nabillaaprillya: I miss you but I hate you
  • LafsKOCOThu Feb 23 01:07:12
    Loooooooool the way @Ms_Kiraa shut him down wow :'(
  • luisfonseca28Thu Feb 23 01:07:12
    Tenéi play golda "@VanessaKhs: vengan a jugar PES 2012 conmigo :("
  • eusou_joaotThu Feb 23 01:07:12
    to rindo mt com elaa @umadosede_refri
  • Lady_PatriotThu Feb 23 01:07:11
    I think I spotted a liberal in the audience. You know who I'm talking about. #CNNdebate
  • summerballparkThu Feb 23 01:07:11
    “태양을 피하는 현대인…비타민D 결핍”: 을지대학교병원은 지난 2011년 종합건강증진센터에서 검진을 받은 성인 3,900명의 결과를 분석한 결과, 86.1%에 해당하는 3,357명에서 비타민D 부족ㆍ결핍증이 진단됐다고기사보기
  • ThaCharlesIVThu Feb 23 01:07:11
    Guys... Im stuck between 2 beautiful cars...
  • Keep_calm_kingThu Feb 23 01:07:11
    pqp o irmão do logan, pqp morri @dudaa_pacheco
  • JesusShuttles34Thu Feb 23 01:07:11
    #GirlsLoveWhen when you hold their waist
  • Gideon_WarriorThu Feb 23 01:07:11
    Sudahkah kamu bersyukur hari ini?**"Give Thanks Inside Fresh Outside #ThanksYOUC1000,

The Code:


    <?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(), 020);
      
$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();
    
?>

References:

The QueryPath API