Return to Snippet

Revision: 41914
at February 24, 2011 21:16 by kirichev

Initial Code
$twit = file_get_contents('');

$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 '<b> '.$tcount.' </b> Followers';

Initial URL

Initial Description
Put this code in your theme, where you want to show followers count. Don't forget to change USERNAME.xml to your twitter user name.

Initial Title
Display number of Twitter followers in your Wordpress based website

Initial Tags
wordpress, twitter

Initial Language