Google Reader now lets you monitor static websites that do not offer RSS feeds

html-2-rssA new feature in Google Reader now allows you to monitor (and get updates) from static websites that do not offer feeds.

Using this feature is as easy as subscribing to a normal RSS feed – simply enter the URL of the site in the Add Subscription box and hit enter. For a feed-less site, Google Reader will automatically show you a dialog box with an option to Create a Feed.

GReader will setup a monitoring service for the page and intimate you of any changes when they occur.

Earlier on, the only options for monitoring a site for changes were third-party services like Page2RSS, Feed43 etc. – which acted as an intermediary layer between your feed reader and the site and provided you with RSS feeds from the target site’s content. To view the feeds, you were required to subscribe to the URL provided by these services using your feed reader.

With Google Reader, you’re essentially able to bypass this middle layer altogether – as both the conversion of a static site to RSS and the reading of RSS feeds will be handled by GReader itself.

If normal feeds are anything to go by, this service may very well double up as an archiving system for a particular web-page by keeping a detailed record of changes of time.

Automatic Tweeting – the newly introduced social aspect of FeedBurner

Socialize - FeedBurner to TwitterJust a couple of weeks back, FeedBurner, without much fanfare, stepped into the social arena. As it is with Google, the surprise came as an extremely useful feature: Automatic Tweeting based upon your feed.

Bloggers who use FeedBurner to publish their feeds can immensely benefit from this new addition. It does away with one whole extra step of using a third-party client (or the Twitter website) for publicizing your posts.

How does it work?

Upon publishing a new post…

  1. FeedBurner immediately grabs your post’s title
  2. Shortens the post’s URL using goo.gl (another recent introduction)
  3. Adds any custom messages and hashtags that you’ve set
  4. And posts it to your Twitter profile

… and the while making sure that the tweet doesn’t exceed 140 characters. Pretty cool ay? If required, it can set set to leave room for retweets too.

The tweeting feature can be setup via the Publicize tab of FeedBurner using this new sidebar item titled Socialize.

FeedBurner's Socialize  settings for  Twitter

If required, tweets can be sent to multiple Twitter accounts. For detailed explanation of individual settings, see here.

Is you ask me, this feature is certainly going to obsolete quite a few WordPress plugins offering similar functionality.

Feedburner: When you face a – Your Ping resulted in an Error “Ping is throttled. Please try again in a minute or so.”

Content TheftYesterday I came upon a couple of splogs ripping off my feeds and publishing the content as their own – lock, stock and barrel (if I may), including the ugly SHA1 hash that I was using as a digital fingerprint to detect content theft.

Digital fingerprints (a unique combination of random characters) happen to be a very good way of nabbing content rippers. 99.99% chances are that these people use automated programs (bots) that scrape content off third-party blogs  (primarily from feeds) and post as their own, which are then used in conjunction with various monetization programs (e.g. AdSense) to generate revenue for the splogger. The scraper bots make verbatim copies of your content and are unable to distinguish between actual content and the fingerprint – hence that too gets published in the splog. Catching such rip-offs can be as simple as doing a Google search for your fingerprint.

Problem lies with that fact that an ugly string of random characters is appended to each of your feed item, which gets displayed to your valid subscribers too. It short, it “destroys” the presentation, creating a nasty impression about your blog. Sploggers on the other hand aren’t bothered by this as all they care about is posting content and making money from it.

While the fingerprint helps you detect content theft, there isn’t much that you can do about it except for going through a lengthy process of serving a notice to the splogger and then informing the web-host (citing the DMCA) in case of non-action. Hence, I decided to get rid of the fingerprint and append a custom copyright message to my feed footers instead – with links back to my post and blog. At least this way it earns me some form of attribution – without making the feed look ugly.  Incidentally, the most suitable plugin I found for this job is Better Feed.

What’s all this got to do with FeedBurner?

Coming to that in a moment. That was a rant that I absolutely HAD TO get out of my system.

Once I was done with my new feed footer,  I tried using the FeedBurner Ping service to update my feed.  That’s when this error message got shoved into my face…

Your Ping resulted in an Error “Ping is throttled. Please try again in a minute or so.”

Googling for it didn’t fetch me any solution – just pages upon pages of complaints to the same effect. Most likely, it’s a problem that’s taken roots in recent times. Whatever, the cause was, it kept me at bay for hours! It simply wouldn’t let me see my updated feed (my blog feed is set to auto-redirect to FeedBurner).

The Solution

Feedburner "Resync now" buttonUse the Resync Now button that’s situated towards lower part of the Troubleshootize page of FeedBurner. When all else fails, hit the big red button 😀

The resync button…

  • Clears our cached version and refreshes its content from your Original Feed
  • Creates podcast enclosures for items that did not previously have them and contain links to podcast content
  • Reports any feed formatting problems encountered during the resync

… Voila! My updated feed appeared rightaway. So, if you’re facing a similar error message, my recommendation is to try the Resync button. It works.

Update: Finally came up with some information on the ping is throttled error message. Indeed, it is an issue that cropped up recently – but, at least now we have an explanation.

How to display FeedBurner Feed Subscriber Count on a custom graphical background

Feed CountHere’s a nice trick I learnt a couple of days back. I wanted to display my feed subscriber count in a way that would match my site’s theme. I was tired of the vanilla feed-count display provided by FeedBurner – probably because you can find it on almost every other site these days (and I wanted something unique). So I got down to designing one on my own and I’m going to show you how to do the same for your site.

I won’t go into any lengthy (step-by-step) discussion on creating the graphical background – that’s something that’ll be your call. But I’ll teach you the core idea – fetching the feed-count from FeedBurner’s server using their API and displaying it on your site.

The Graphical Part

First and foremost, you need to decide on what kind of a display you want – small or large, dark or light. For example, I chose to display mine on a black background with medium sized font (see my RSS box at the top of the page). Depending on your background, you’ll need to either create or find a suitable RSS icon. You can find some excellent tutorials on creating feed icons here, here and here. Alternatively, you can download a whole bunch of free icons from here.

As a starter fire up your favourite graphics editor (Adobe Fireworks for me). For simplicity’s sake we’ll follow the same approach as I did with my feed-count box. Draw a black rectangle with rounded corners. Place your feed icon in a suitable place. Then draw another smaller rounded rectangle inside the earlier one, but with a lighter stroke colour (say white). This will be the container where you display your feed-count. You can throw in some fancy glow / shadow effects as you like. We should get something that approximately resembles the following image.

Feed Count Container Graphics

The image shown above was created with Fireworks and is an editable layered PNG file. If you’re using Fireworks, you can very well download this one (Right Click on it > Save Image), use it as a starting point and add/edit/resize it according to your preferences.

The Coding Part

You need to ensure that your web-host offers cURL (as an extension of PHP). By default, 90% of the web-hosts do – so you shouldn’t have anything to worry about. Secondly, the FeedBurner Awareness API (for your feeds) should be turned on. If you have been using the Feed Count feature of FeedBurner – then it IS already turned on. If not, you can login into your FeedBurner account, select the Publicize tab for the appropriate feed and activate this service. Once you’ve made sure of these two factors, we can progress to the actual coding.

Here’s the code you’ve going to need.

// Get FeedBurner Subscription Count - using FeedBurner Awareness API
function get_feedburner_count( $uri, $display = 'true', $format = 'true' ) {

	// Construct URL
	$apiurl = "http://api.feedburner.com/awareness/1.0/GetFeedData?uri=" . $uri;

	// 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, $apiurl );
	// Execute the fetch
	$data = curl_exec( $ch );
	// Close the connection
	curl_close($ch);

	// Parse XML
	try {
		@$xml = new SimpleXMLElement($data);
		$fcount = $xml->feed->entry['circulation'];
	} catch ( Exception $ex ) {
		// echo 'Caught exception: ',  $ex->getMessage(), "n";
		$fcount = "?????";
	}

	// Display or Return, Formatted or Unformatted
	if( $display ) {
		if( $format )
			echo number_format( $fcount, 0, '.', ',' );
		else
			echo $fcount;
	}
	else
		return $fcount;

}

If you’re wondering where you’re going to add this code without messing up your theme – almost all modern WordPress themes have this file named functions.php, which contains the functions essential for registering the sidebar, tweaking specific WordPress routines etc. You can add this code to that file and it’ll be made available for calling from anywhere inside your theme.

The function is called get_feedburner_count() and accepts three parameters – two of which are optional. Here’s an explanation of the parameters…

  1. $uri – This is a mandatory parameter. If you don’t specify this one, the function won’t be able to fetch the feed count. The URI is the name you chose to represent your feed on FeedBurner. For example – my feed url is, http://feeds.feedburner.com/ChaosLaboratory. That makes my URI, ChaosLaboratory. This is what needs to be specified here.
  2. $display – This is an optional parameter. It takes up the values true or false. I have modelled this function on the lines of the general WordPress template functions – which means that the function is able to either display the feed-count directly, OR return it to you for further processing. If you don’t specify any value here, it’ll default to displaying the feed-count.
  3. $format – This too is an optional parameter and takes up either true or false. By default it is set to true. This tells the function to pass the feed-count through another formatting function, which adds a digit-grouping comma to it for every thousandth place. The formatting occurs on Line 31 of the code and you can modify that line to reflect any sort of formatting you want.

A typical call the function can look like,
get_feedburner_count( 'ChaosLaboratory' ); – this will print out the formatted feed-count directly

OR

$fcount = get_feedburner_count( 'ChaosLaboratory', false, false ); – this will fetch the raw (non-formatted) feed count and store it in a variable called $fcount. This doesn’t print the figure directly to the screen, but leaves it at your disposal for further processing

OR any variation thereof.

Now, we need to apply some styling to that background image we created so that the feed-count is aligned properly.

Note: I applied the styling on an anchor (link) tag, since I wanted to make the whole image clickable, so as to provide a way of subscribing to my feeds too. Here’s an example…

a#feedcount {
	display:block;
	width:120px;
	height:26px;
	margin:0;
	padding:5px 10px 5px 0;
	background:url(images/bg-feed.png) no-repeat transparent;
	color:#D6D6D6;
	font-size:2em;
	font-weight:bold;
	text-align:right;
	text-decoration:none;
}

Points to note here: On Line 1, I’ve declared display:block. This is necessary, since the a tag by default is an inline element – which means, it collapses to the exact width of the text contained in the anchor. This is not desirable here as we’re attaching the background image to the a tag, and we want it to adapt to the exact proportions of it (specified in Lines 3 & 4). I’ve aligned the feed-count text to the right (Line 11) and used a padding of 10px on the right (Line 6) so as to leave a comfortable gap from the right edge of the graphics.

The code-block above can be added to your template’s stylesheet file or in the header.php within style tags – depends on you. For me, I prefer to keep all the styling in one place, i.e. the stylesheet file.

Adding it to your template

Now that we’ve got all the code in the right place, it’s time to add it to the template. Open up the appropriate file (header or index) – where you want to display the feed-count and add the following lines…


	< ?php get_feedburner_count( "YOUR_FEED_URI" ); ?>

And that’s it! That should display your feed count with the custom graphical background and make the image clickable too, to act as a feed subscription button. The final effect should look like the following…
FeedBurner Feed Count with Graphical Background

Any questions / clarifications, feel free to write back.

Switching to the domain-based FeedBurner Pro service

RSS FeedI recently purchased Managed DNS service from my web-host (ComputingHost) as a result of which I no longer have to depend upon their tech support to cater to my DNS record modification needs. Consequently, I decided to switch to the FeedBurner Pro domain based feed service. Domain based feed service means you can customise the FeedBurner to handle your feeds straight under your domains URL (Example: http://feeds.your-domain.com) instead of the usual http://feeds.feedburner.com/YourFeed.

Earlier on this service was available under FeedBurner Pro as a paid option. Ever since Google acquired FeedBurner, this has been made free. As long as you own a domain and are able to modify your DNS records, you can set this up.

Henceforth, all feed subscribers are kindly requested to use the following URL:

http://feeds.chaos-laboratory.com/ChaosLaboratory

or

http://chaos-laboratory.com/feed

instead of the earlier:

http://feeds.feedburner.com/ChaosLaboratory

For existing subscribers – the old URL will still function, but to help facilitate my subscription tracking, kindly update the feed URL.

Any new subscribers automatically subscribe through the new domain based feed URL.