Tag Archives: Twitter

WordPress Plugin Tweets – PHPCodezTweets

It can be used to list latest tweets and the username and output can be managed from admin side

== Description ==

PHPCodez Tweets list latest tweets and the username and output can be managed from admin side

Advatages
======
1) We can restrict the number tweets
2) We can set the twitter user name from admin panel
3) We can show/block images

== Installation ==

1. Upload the plugin folder to your /wp-content/plugins/ folder.

2. Go to the **Plugins** page and activate the plugin.

3. Go to appearance->widget area and drag the widget “PHPCodez Tweets” to the widget area to have this on the sidebar .

Click here to download the plugin

Share

Latest tweets in your site – PHP

<?php

$username=”tppramod”; // Your Twitter username

$limit=10;//Number of tweets

if(!is_numeric($limit)){$limit = 10;}

$xml = simplexml_load_file(‘http://search.twitter.com/search.atom?q=from%3A’.urlencode($username));?>

<table>

<?php for($i=0;$i<$limit;$i++){

if(empty($xml->entry[$i]->content)) break;

$attr = $xml->entry->link[1]->attributes();

?>

<tr> <td> <img src=”<?php echo $attr[‘href’]; ?>” /> </td> <td style=” font-size:12px;”> <?php echo  $xml->entry[$i]->content; ?> </td> </tr>

<?php } ?>

</table>

Share