If you have followed the last tutorial How To Display Feedburner Subscriber Count As Text Instead Of Chicklet I’m sure you would like to know how to do same with Twitter so that your follower count is displayed as a text, rather than using some badge. Just follow this simple tutorial.
Procedure:
Note: Do take backup of your theme before you try this.
01. Just Add below code where you want to display all your twitter counter as text:
<?php
$twit = file_get_contents('http://twitter.com/users/show/TUTZONE.xml');
$begin = '<followers_count>'; $end = '</followers_count>';
$page = $twit;
$parts = explode($begin,$page);
$page = $parts[1];
$parts = explode($end,$page);
$tcount = $parts[0];
if($tcount == '') { $tcount = '0'; }
echo '<div class="twitter-badge"><strong>'.$tcount.' </strong> Followers</div>';
?>
This concludes this simple and useful tutorial. Hope you like it.
Pingback: designfloat.com
Pingback: Tweets that mention How To Display Twitter Counter in Text | TutZone -- Topsy.com