Display Feedburner Subscriber Count as Text

Have you ever been to a site that is not using Feedburner button and is still showing subscriber count? Well they are probably using the trick we are about to share. Most designers use this trick to have custom styling and avoid the annoying feedburner button.
Simply copy and paste this code anywhere you like most likely sidebar.php
I believe you’ve seen websites and blogs that uses the text-based Feedburner subscriber count instead of the chicklet. I hope you are not getting the idea the these guys update their feed count manually. Instead, it can be done easily with scripts, and the reason why you want to do is – it gives you total flexibility in terms of design, styling and display.
Step 1
Step 1
Copy paste the following code into your template, replace feedburner-id with your Feedbuner username. This script will grab you the feed count in numbers.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| //get cool feedburner count //Initialize the Curl session $ch = curl_init(); //Set curl to return the data instead of printing it to the browser. curl_setopt( $ch , CURLOPT_RETURNTRANSFER, 1); //Set the URL curl_setopt( $ch , CURLOPT_URL, $whaturl ); //Execute the fetch $data = curl_exec( $ch ); //Close the connection curl_close( $ch ); $xml = new SimpleXMLElement( $data ); $fb = $xml ->feed->entry[ 'circulation' ]; //end get cool feedburner count |
Step 2
Paste this anywhere you want and it’ll display a Feedburner subscriber count in text.
Display Feedburner Subscriber Count as Text
Reviewed by Unknown
on
4:37 AM
Rating:

No comments: