FeedBurner and Twitter counts as text

Posted In Hacks - By Geoserv On Wednesday, October 13th, 2010 With 135 Comments

Today we are going to show you a simple method to showoff your FeedBurner subscriber count as well as your Twitter follower count in your sidebar, or anywhere you want really.

The code below as well as the images for it are included in the download below.

In the code you must change the inputs where indicated for it to work:

<style>
.counts {width: 100%; font: 1.2em DeliciousRoman,sans-serif;}
.fb {float: left; width: 45%; margin-right:5px; }
.twitter {float: left; width: 45%;}
.clearer {clear:both;}
</style>

<div class="counts">
<div class="fb">
<img src="http://www.URLTOIMAGE.com/images/fb.jpg" alt="fb" style="vertical-align:middle;" />
< ?php
$url = file_get_contents(‘https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=YOUR FEEDBURNER URL’);
$begin = ‘circulation="’; $end = ‘"’;
$page = $url;
$parts = explode($begin,$page);
$page = $parts[1];
$parts = explode($end,$page);
$fbcount = $parts[0];
if($fbcount == ”) { $fbcount = ’0′; }
echo ‘<a href=YOUR FEEDBURNER URL><b>’.$fbcount.’</b> Subscribers’;
?>

</div>
<div class="twitter">
<img src="http://www.URLTOIMAGE.com/images/twit.jpg" alt="fb" style="vertical-align:middle;" />
< ?php
$username = "YOUR TWITTER USERNAME"; // Your twitter username
$output = "text&"; // text or js
$url = "http://api.syberplanet.net/twitter/?u=$username&output=$output";
$followers = file_get_contents("$url");
echo ‘<a href=http://twitter.com/YOUR TWITTERUSERNAME><strong>’.$followers.’</strong> Followers’;
?>

</div>

<div class="clearer"></div>

</div>

 

You can customize the CSS for it to match your current design, this is what we use on FAQPAL.

Now in order to get the counts to display is to open sidebar.tpl and add the following line:

{php}include(‘/PATH/TO/THE/FILE/sidebarsocstats.php’);{/php}

Heres what the above will result in:

  Sidebar Social Stats (11.3 KiB, 127 hits)

Enjoy.

Related Search:

  • FeedBurnerandTwittercountsastext
Tags: , , ,

About - Geoserv has been working with the Pligg CMS for 2+ years.

  • http://www.utilitysoftwarereviews.net driver detector

    I really intend on coming back to the site in the upcoming days. Keep up the excellent work!

  • http://www.meganba.com NBA

    Cool! I’ll have to try this out.

  • http://www.themattresssuperstore.co.uk Memory Foam Mattress

    Is it mostly for marketing funds and server maintenance only?And how do they convince the VCs for funding when they are not making any money?Why do sites like Twitter or Formspring need funds from venture capital firms.

  • http://www.packageindia.com Best travel company in india

    FeedBurner is a web feed management provider and nice post thanks for sharing this post….

  • http://www.utilitysoftwarereviews.net driver detector

    Oh wow! I have always been thinking a lot and finding more effective ways to better convert my blogs’ visitors into clients and customers. This is a great way to start then.

  • http://www.collegesurvivalgear.com/ College Gear

    Feedburner is a great service to have for your visitors. Thanks for Sharing

  • http://sekarung.info/ Social bookmarking indonesia

    thank a lot, try it all, its nice :)

  • http://www.stellarinfo.com/outlook-pst-file-recovery.htm PST Recovery

    It’s a advanced way to make your blog more effective or advance.

  • http://www.stellarwindowsdatarecovery.com/ Windows Recovery

    M l M luking to add this on my fanpage..to make my page more effective

  • http://www.meganba.com NBA

    Oh wow! I have always been thinking a lot and finding more effective ways to better convert my blogs’ visitors into clients and customers. This is a great way to start the

  • http://www.best-web-hosting-companies.com/ Kavya Hari

    Hello, its one of the best direction to keep our blog in advanced way. Thanks a lot for given your post on here.:)

  • http://www.themattresssuperstore.co.uk Memory Foam Mattress

    When I find someone on Twitter that has expertise in a micro niche, I want to Follow who THAT person is Following (and) in some cases, I want to Follow the people who are Following him or her.Thanks

  • http://www.richerornot.com Make Money Online

    i use a plugin that isnt really good for twitter recounts… i need better alternatives. thanks for this post!

  • http://www.lucaslabels.ie canvas art toronto

    i don’t used feedburner.

  • http://www.lucaslabels.ie Printer consumables

    yes i read about this recently.

  • http://www.collegesurvivalgear.com/ College Gear

    That interesting i didn’t realize this.

  • http://www.strategiclawyers.com.au/ Lawyers Townsville

    Ya!I have no confusion on this nice script that really a amazing collection of good idea.

  • http://seoforblog.com Outsource Seo Services

    Wow! I did read this new news on your website its very amazing. You have a great mind with great programming script.

  • http://www.berelevantgroup.com/ getting more appointments

    Your blog is brilliant! Generally when I visit blogs, I just come across shit, but this time I was really surprised when I got your blog containing good information. Thanks mate and keep this effort up.

  • Asthmatreatmenthelp

    When I search out someone that is famous that I am interested in following, there are usually multiple accounts trying to be that person. Is there a way on Twitter to figure out who the real person is?

  • Indian Groceries Online

    Go to their profile. Look on the righthand side, right above their name, location, etc. If you see a blue badge with a check in it and the words “verified account” next to it, you know they’re the real deal.

  • Indian Groceries Online

    Many of the celebrities or popular public figures on Twitter have had their account “verified.”

  • http://www.usarealestateguru.com/ Real Estate Simi Valley

    Happy to learn about FeedBurner more.Thanks for sharing with all.You have a great mind with great programming script.

  • http://www.hairup.gen.tr sac cikarici

    Nose: MIR (minimally invasive rhinoplasty) rhinoplasty technique, reduce the size of the nose, reshape the tip enlarge, reduce tümsekliğini nose, upper lip and nose to correct the angle between the bad (nose lift), narrowing a wide nose, wings, nose and nostrils, and the prevalence of downsizing applied to eliminating. The operation lasts 30 minutes. The patient is sent home were discharged after 3-4 hours. In addition, this technique is almost negligible swelling and bruising.
    Eye Contour: The upper eyelid is a natural skin bend is entered and the amount of excess skin. Some of the muscle surrounding the eye is removed and the oil in a thin strip is much needed. The amount of fat formed in the lower eyelid. This operation allows rejuvenation of the eyes 7-8 years.

  • http://www.somatropinonline.com/ARTICLE-656/modafinil-alertness-alzheimers-disease-depression.htm modafinil

    Wonderful tips you for Twitter and Feed burner

  • http://www.boldbodyfitness.com/ p90x

    Great tutorial here. I was wondering how to make twitter count as text. thanks.

    - Robert

  • http://www.disbeyazltmakalemii.com diş beyazlatma kalemi

    WhitePen Teeth Whitening Pen, creating spectacular results in the use of dentists recommended by the easy and effective tooth whitening pen.

  • http://www.fridaysapparel.com/ Promotional Products

     Amazing tutorial shared thanks for this…

  • http://www.roarsinc.com/ internet marketing

     What is the reason for this ?

  • http://www.homeroomteacher.com/ Educational classroom supplies

    Thanks for sharing the code..

  • http://www.walkingstickshack.co.uk/ Walking Sticks

    Where can I learn to be able to code like this?

  • http://www.addvalue.com.au/ conference gifts

    thanks for this code snippet you have shared. Do this also work on blooger platform? since I have both blogger and wordpress blogs to set up on this.

  • http://www.webuytextbooks.com/ Sell Textbooks

    That is really cool thanks

  • http://libmp3.com/ download music online

    You’re doing very well!

  • http://virtualprivateserver.net/ virtual private server

    Thanks for the code, I have wanted to do this for a bit but didn’t’ know how.