Home » , , » How to Display Twitter Follower Count as Text

How to Display Twitter Follower Count as Text

There is a button like a feedburner count button for Twitter Follower Count. If you want to display your twitter count as text, follow this instructions

First of all you must create file named twitter.php and paste the following code in there:


<?php
$tw = get_option("twitterfollowerscount");
if ($tw['lastcheck'] < ( mktime() – 3600 ) )
{
$xml=file_get_contents('http://twitter.com/users/show.xml?screen_name=wpboxblog');
if (preg_match('/followers_count>(.*)</',$xml,$match)!=0) {
$tw['count'] = $match[1];
}
$tw['lastcheck'] = mktime();
update_option("twitterfollowerscount",$tw);
}
echo $tw['count'];
?>

Make sure you've replaced 'wpboxblog' with your twitter username.

Now you can paste this code anywhere you want to show Twitter Follower Count as Text

<?php include("twitter.php"); ?>
If You Like product from here Click Here free product informationGoogle Android PC Tablet

0 comments:

Post a Comment

 
Support : Creating Website | SEO Template | Free Template
Copyright © 2011. Free Wordpress Theme And Templates For You - All Rights Reserved
Proudly powered by Blogger