Archive - Apr 2, 2007

Date

Simple Twitter Status

I would not like flash my page.
So this one could show texts on Twitter status

$username = 'your user name';
$password = 'your pass word';
$num_show = 3;//show how much message
$url = 'http://'.$username.':'.$password.'@twitter.com/statuses/user_timeline.xml';
$xml = simplexml_load_string(file_get_contents($url));
$i = 0;
while($xml->status[$i]&&$i<$num_show){
	echo 'Time:',$xml->status[$i]->created_at,'<br />';
	echo $xml->status[$i]->text,'<br />';
	++$i;
}
Honey Pot that kill bots