/ Published in: PHP
via @kenrick1991
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function getTwitterStatus($userid){ $url = "http://twitter.com/statuses/user_timeline/$userid.xml?count=1"; foreach($xml->status as $status){ $text = $status->text; } echo $text; } //my user id USERNAME getTwitterStatus("USERNAME"); ?>
URL: http://css-tricks.com/snippets/php/get-latest-twitter-status/