Tag Archives: Twitter
Latest tweets in your site
<script src=”http://widgets.twimg.com/j/2/widget.js”></script><script type=”text/javascript”>// <![CDATA[new TWTR.Widget({ version: 2, type: ‘profile’, rpp: 4, interval: 6000, width: 272, height: 300, theme: { shell: { background: ‘#24838a’, color: ‘#ffffff’ }, tweets: { background: ‘#f5f5f5’, color: ‘#000000’, links: ‘#000000’ } }, features: { scrollbar: true, loop: false, live: false, hashtags: true, timestamp: true, avatars: true, behavior: ‘all’ }}).render().setUser(‘tppramod’).start();// ]]></script>
//modify the user name “tppramod” with the desired one .
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>