rsstheme
close

Shock and Awe Marketing Tutorials in Plain English

Hair raising marketing plans that get Venture Capital dollars in your pocket

Welcome to Netamorfasis: the personal marketing blog of Mary McKnight.  This site focuses on shock and awe marketing techniques, general business education, SEO and advice for those seeking venture capital funding.  Mary McKnight acts as a private consultant to mid to Fortune 500 sized businesses and venture capital groups. 

Yeah, yeah yeah and we all know I am like totally infamous in the real estate space for getting kicked out of online social networks, fired from a company I founded and ya da ya da ya da.  Call me Miss Behavin'.



About Us

Subscribe

rss logoLike what you are reading here? Then let us email you with all our new content.



Most Popular Posts

My Music Sharing

LyricsPlaylist

Daily Mug Shot

 

 

Most Recent Posts

Connect with Mary

My Profiles

Need help with your SEO or blogging right now? Then connect with me directly! You can find me on the web at the following:

View Mary McKnight's profile on LinkedIn

Mary Mcknight Twitter Profile

facebook

Mary Mcknight Twitter Profile

Page copy protected against web site content infringement by Copyscape

Please NOTE- this site and the accompanying eBook are fully copyrighted to Mary McKnight of RSS Pieces, Inc.  (an active Florida Corporation in good standing) and Netamorfasis.  Any other copies of this site in full or in part on the web that 1. do not have written permission to replicate this site, 2. are not puling an approved RSS feed that maintains all links or 3. have not been granted a limited license are in violation of ths copyright and will be prospecuted.  This copyright notice extends to the use of this material on the www.rsspieces.com domain while not under the full domain and DNS control of RSS Pieces, Inc.

This notice also extends to those individuals and entities that are using keystone code copyrighted to John McKnight in the Diachronics Platform or Canons Framework.

Blog Comments 1 comment »

Integrating external feeds: Part 1

A wise man one said "You have been given two hands. One to give and the other to receive." In the spirit of that quote we are going to write a multiple part article on itegrating remote RSS feeds into your existing website.

The examples in this series are meant to be a guide for integrating feeds and not necessarily an exhaustive imlementation so standard *disclaimers apply. That having been said, let's begin.

The Tools

In this first article we will show you how to implement a basic RSS feed using SimplePie. We have chosen SimplePie because its implementation of feed reading is reasonably complete with support for RSS and Atom as well as enclosures for the podcast inclined. SimplePie requires PHP 4.3+ or PHP 5.0.3+ which is a pretty common configuration for most servers and hosting environments. It also needs the XML extension and curl or an unlocked fopen. If you have these, you may now pass Go and download the scripts so we can begin.

In addition to SimplePie's ability to read feeds, it is also responsible for the caching of feeds and this is a tremendous value. Some feed reading examples use Javascript and by virtue of its use the feeds that are displayed suffer common maladies like no or poor caching resulting in slow page loads for visitors and no SEO value for the actual feed. While these are important topics, they are not appropriate for this article and have been addressed in other posts.

Because the code is so brief in this example, we will merely address the key points which inclusion of SimplePie and creating the objects that read the feeds.

Rather than reference the scripts through relative paths, this script expects and requires that SimplePie is installed in a subdirectory below the example script and named 'SimplePie'

SimplePie uses classes to encapsulate the feed reading behavior so elementary understanding of objects and OOP would be helpful but these next tidbits will example what is happening.

 

The million mile view

The following line of code creates a new SimplePie object and is resposible for doing the basic housekeeping that makes feed reading possible.

$feed = new SimplePie();

This line tells the feed reading object which URL we will be processing. The URL was passed into the feed reader function and for the sake of this example is pointing at our own RSS feed.

$feed->feed_url($url);

This line causes SimplePie to read the feed and store the RSS items for later access. At this point SimplePie has decided if the cache is present and/or expired and chooses to either read the feed from the website or simply pull a copy from its cache. SimplePie allows you to set the cache lifetime but we have opted for the defaults to keep this example simple.

$feed->init();

The next lines of code in the full listing below merely walk the items that were pulled and displays them. We have used basic tags for display so the output can be customized through CSS.

This next block represents the functional example which forms the basis example.

<?php
/* Feed reader article #1 by John McKnight @ RSS Pieces.
* Notes:
* This code is written as a function to ease integration into the following articles.
* It is also intended to be embedded into an existing page so it will not generate headers or a valid HTML document
* but instead creates a rudimentary piece of HTML to load into an existing page.
* There are also provisions for an options array to be passed in which will be expanded
* so that it can be configured easily.
*/

error_reporting(E_ALL);
ini_set('display_errors', 1);

// The feed to read.
$feedURL = 'http://www.netamorfasis.com/RSS2';

include_once(dirname(__FILE__) . '/SimplePie/simplepie.inc');

feedReader($feedURL);

function feedReader($url, $options = array()) {
$feed = new SimplePie();
$feed->feed_url($url);
$feed->init();
echo '<div class="RSSResults">';
if ($feed->data):
$items = $feed->get_items();
echo '<div class="RSSSummary">Displaying ' . $feed->get_item_quantity() . ' most recent entries.</div>';
foreach($items as $item):
echo '<div class="RSSItem">';
echo '<h4><a href="' . $item->get_permalink() . '">' . $item->get_title() . '</a> ' . $item->get_date('j M Y') . '</h4>';
echo $item->get_description();
echo '</div>';
endforeach;
echo '</div>';
endif;
}

?>

I'll leave you with this code to test, digest and play with for now. In part two we will implement the options parameter and roll the code into a WordPress plugin so you can see it in action.

*While we strive to write complete and functional examples it is possible that a bug or two slips through the cracks. Where possible and known they will be addressed but this should certainly get you started.

Related Posts
TRAFFIC DRIVING content
Generate 100+ More Quality Real Estate Leads per Month by Feeding Your Blog RSS Feeds from the MLS
Are RSS feeds killing your website?
Why Realtors Should Use RSS
Why you must have a blog by January 07


Default avatar

Posted on October 19, 2006 15:38:24 by Blog Author John.McKnight
Blog Categories Posted in RSS Marketing
Comment from: Posicionamiento valencia [Visitor] Email · http://www.posicionamientovalencia.com
****-

A good article about simple pie rss reader.

PermalinkPermalink May 08, 2008 11:04:43
Comment on this article
Poor Excellent
  Line breaks become <br />


  Remember me


  Allow users to contact you through a message form.
Captcha image.

Please enter the characters from the image above. (case insensitive)

This post has no comments awaiting moderation.

 
 
SEO Consulting!
Mary McKnight
Copyright © 2009 All Rights Reserved.
Sitemap