SaveYourself.ca •Sensible advice for aches, pains & injuries
 

Publish SaveYourself.ca’s RSS feed

Put my blog posts on your own website or blog with a little plug-and-play PHP


If you like what you see on the front page of SaveYourself.ca, why not add it to your website? A compact list of recent titles can be automatically displayed, and automatically updated — once it’s set up, you never have to think about it again. Google registers the regularly changing links as a good sign of fresh content, and rewards you for it with better Page Rank — and, of course, hopefully the links are of value to your readers!

So, how do you do it?

Warning: this is a bit technical! If you know anything at all about PHP, this will be pretty painless, and you can also feel free to contact me for some assistance in setting it up. However, if you are completely new to PHP, it may not be worth getting into. Basically all it takes is to copy some PHP code over to your site and then make sure it’s doing its thing. The code is written and tested and it’s pretty simple — so it’s just a matter of putting it on your site, with the one caveat that it requires the CURL library of functions, which some servers don’t have. So if it seems like it should work but isn’t, that’s probably why.

Note that the correct way to display an RSS feed on your site (mine or anyone else’s) is using PHP, since the article links and titles actually becomes part of your site, which increases Google Page Rank for both of us (mine because you’re linking to me, yours because of constantly refreshed links). The final product will look something like this (box optional):


News from SaveYourself.ca …

January 30, 2012: Evidence accumulating for a better runners knee surgery — This week I am too busy studying for a final exam in my history of science course to do much more than an easy science news item for ye old blogge. …

January 23, 2012: An inflammatory problem, Part II — Last week on this here blog: burning Achilles tendons and burning humiliation fueled a long overdue revision of “inflammation” information. And now: the exciting conclusion to our story … Film Fatale: Tendon! A recent awesome …

January 16, 2012: An inflammatory problem — My Achilles tendons have been hurting off and on for a long time, many years now. I have so many aches and pain (it’s not a coincidence that I write books about pain) that I didn’t …


Those links and titles are automagically taken from my RSS feed, and will automagically be updated as my RSS feed changes. Pretty cool, eh? The code that pulls it off is about 25 lines, not very complicated, and certainly customizeable. (It requires the CURL library of PHP functions, which is standard on most web servers but perhaps missing from some, so if it just does nothing at all that’s probably why.) Here is the code. Just click in the green box to select the code, then copy and paste it:

So just paste that code exactly where you want my RSS feed to be displayed, and it will produce a series of paragraphs (<p class="SYrss">) of linked article titles. If you know something about CSS, you can change the appearance of the paragraphs any way you like just by tinkering with the class “SYrss”. Good luck!