You can see this in action here:
comparasuper.com/es/con_twitter.php
SAMPLE CODE:
<?php
//INCLUDE HERE THIS CLASS
$readTwitter = new TwitterApi;
$readTwitter->Login = 'YourLogin';
$readTwitter->Password = 'YourPass';
$readTwitter->RecivePosts = 15;
$array = unserialize($readTwitter->yoursTweets());
$twit="<ul>";
for($i = 0; $i < sizeof($array); $i++){
//URL: Replace URLs with HTML links or full image paths with <img> tag
$search=array (
'`((http://)(\S+[[:alnum:]]/?))`si');
preg_match($search[0], $array[$i]['msg'], $matches);
if ( substr($matches[0],-4)=='.png' || substr($matches[0],-4)=='.jpg' || substr($matches[0],-4)=='.gif' ) {
$repl =array (
'<img src="$1">');
} else {
$repl =array (
'<a href="$1" rel=\'nofollow\'>$1</a>');
}
$msg=preg_replace($search,$repl, $array[$i]['msg']);
$day= substr($array[$i]['date'],0,10);
$twit.=<<<HTML
<li><img src="asset/twitter.jpg">{$msg} <i>({$day})</i></li><br>
HTML;
}
$twit.="<ul>";
echo $twit;
?>
__________________
Enjoy!