26 Mar, 2009

How to display google subscribers feed count in text? and to customize its design

Posted In: Google| Tips Tricks

share this

  • Technorati
  • del.icio.us
  • StumbleUpon

You can display your feed subscriber count and display it seperately. This is the code to display google feed subscribers as a text

<a id="feedcount" href=http://feeds.feedburner.com/eHot
title="Feed Subscriber Count / Subscribe...">
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
"https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=eHot");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$xml = simplexml_load_string(curl_exec($ch));
echo "" , $xml->feed->entry['circulation'] . "";
curl_close($ch);
?>
</a>

To display your feed Just edit the above code

https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=eHot

Replace eHot with your own feed url

Some of the post this kind of code which won’t work because google now moved feedburner into google server and hence changed its awareness api with https:// security socket layer, so even if you paste this in your website you can view it only the system that has open https port, the system that has no open port for https won’t work.

I have just use some css code to display the letter with.  Here i just used some padding properties placing a background image.


a#feedcount {display:block;width:240x;   
height:89px;
margin:0;
padding:20px 150px 0px 49px;
background:url(images/feedsubscribers.png) no-repeat transparent;
color:#FF5200;
font-size:2em;
font-weight:bold;
text-align:left;
text-decoration:none;}

Here is how it displays

249

  • Digg
  • Reddit
  • del.icio.us
  • StumbleUpon
  • TwitThis
  • E-mail this story to a friend!

No Responses to "How to display google subscribers feed count in text? and to customize its design"

Subscribe to Comment follow up

Comment Form

Spam protection: Sum of 6 + 7 ?

Trackbacks

  • (Please don't forget to 'Activate' the email subscription from your Inbox!)