Show DevBest [PHP] "Latest Tweet" script

Status
Not open for further replies.

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
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...
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" );
?>
 

Gibbo

Active Member
Jun 4, 2010
163
27
Thanks so much for releasing. I have been looking for one of these for a while now (Y)

Thanks
 

Cablink

http://www.vroleplay.net - join now!
Feb 4, 2011
382
27
Thanks, I will be using this for my hotel, so people can "tweet" around! :D
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
Didn't know anyone replied lol, glad you all like it.
 
Status
Not open for further replies.

Users who are viewing this thread

Top