This is just a really basic "latest Tweet" script I made for my newest and upcoming website I'm developing.
It's only a couple of lines long and it may come in handy for some people, so enjoy...
It's only a couple of lines long and it may come in handy for some people, so enjoy...
PHP:
<?php
function twitter( $username )
{
$twitterurl = file_get_contents( "http://twitter.com/statuses/user_timeline/{$username}.xml?count=1" );
$xml = new SimpleXMLElement( $twitterurl );
$s = $xml->status;
$text = $s->text;
return $text;
}
echo twitter( "twitter_name_here" );
?>