<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.corvidworks.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Corvid Works</title>
	
	<link>http://www.corvidworks.com</link>
	<description>Web Development, System Administration, Technology Consulting</description>
	<lastBuildDate>Wed, 13 Jan 2010 21:12:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.corvidworks.com/CorvidWorks" /><feedburner:info uri="corvidworks" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>CorvidWorks</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>New online shop for Colette Patterns</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/06lzktkggQ4/new-colette-patterns-shop</link>
		<comments>http://www.corvidworks.com/articles/new-colette-patterns-shop#comments</comments>
		<pubDate>Sat, 28 Nov 2009 17:40:11 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=171</guid>
		<description><![CDATA[I just wrapped up work on a new web site for Colette Patterns, a independent sewing pattern designer in Portland, Oregon (who also happens to be my wife).



About Colette Patterns

From the Colette Patterns about page:


Colette Patterns&#8217; mission is to help you create clothing that feels both beautiful and personal. While it&#8217;s all too easy to [...]]]></description>
			<content:encoded><![CDATA[<p>I just wrapped up work on a new web site for <a href="http://www.colettepatterns.com/">Colette Patterns</a>, a independent sewing pattern designer in Portland, Oregon (who also happens to be my wife).</p>

<p><a href="http://www.colettepatterns.com/"><img src="http://www.corvidworks.com/images/2009/11/colette-patterns.png" alt="Colette Patterns" title="Colette Patterns" width="300" height="225" class="center" /></a></p>

<h3>About Colette Patterns</h3>

<p>From the Colette Patterns <a href="http://www.colettepatterns.com/about">about</a> page:</p>

<blockquote>
<p>Colette Patterns&#8217; mission is to help you create clothing that feels both beautiful and personal. While it&#8217;s all too easy to find cheap, cute, disposable clothing meant to be worn for weeks or months and then discarded, making your own clothing is an entirely different experience. It&#8217;s something cherished, something chosen, something entirely you.</p>
</blockquote>

<h3>About the project</h3>

<p>In order to easily incorporate the blog on the old Colette Patterns site, this site was built entirely on Wordpress. Working from the designs provided, I created a Wordpress theme from scratch and integrated the <a href="http://shopplugin.net/">Shopp</a> ecommerce plugin to run the store. Customers are given the choice of buying via Paypal or a secure on-site checkout using Authorize.net.</p>

<p>Shopp is a great choice for anyone needing to add ecommerce onto a Wordpress site. I chose it over the other options in this area due to the well designed <span class="caps">API </span>and clearly written documentation. The store pages are heavily modified versions of the Shopp defaults.</p>

<p>The front end is valid <span class="caps">XHTML </span>and <span class="caps">CSS, </span>except in a couple spots where invalid markup is generated by backend plugins. All JavaScript on the site was written using jQuery.</p><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/06lzktkggQ4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/new-colette-patterns-shop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/new-colette-patterns-shop</feedburner:origLink></item>
		<item>
		<title>doGoodr connects people in need with offers to help</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/hYawe1H3cPs/dogoodr-launched</link>
		<comments>http://www.corvidworks.com/articles/dogoodr-launched#comments</comments>
		<pubDate>Thu, 02 Jul 2009 17:06:30 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=167</guid>
		<description><![CDATA[It&#8217;s with great satisfaction that I can announce the launch of doGoodr, the project that&#8217;s taken the majority of my work time for the past year. 



From the doGoodr Fund mission statement:

Our mission is to facilitate charitable and philanthropic endeavors, increase public participation in initiatives to do good, and maximize the public benefits for those [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s with great satisfaction that I can announce the launch of <a href="http://dogoodr.org/">doGoodr</a>, the project that&#8217;s taken the majority of my work time for the past year. </p>

<p><a href="http://dogoodr.org/"><img src="http://www.corvidworks.com/images/2009/07/dogoodr.png" alt="doGoodr" title="doGoodr" width="300" height="225" class="center" /></a></p>

From the <a href="http://thedogoodrfund.org/">doGoodr Fund</a> mission statement:<br />
<blockquote>
<p>Our mission is to facilitate charitable and philanthropic endeavors, increase public participation in initiatives to do good, and maximize the public benefits for those most in need.</p>
<p>To accomplish this we&#8217;ve developed doGoodr: A web site and suite of Internet-enabled tools that allow anyone with a legitimate need and anyone wishing to offer them assistance, to find each other in the fastest, most efficient way possible.</p>
</blockquote>

<p>If you have a cause or project that you need help with &#8212; anything from large-scale natural disaster relief to a local &#8220;save the soccer field&#8221; campaign &#8212; you can post it to doGoodr along with details on what you&#8217;re doing, who you&#8217;re helping, and the resources you need to do it. Likewise, if you&#8217;re looking to get involved in a charitable cause by donating time, money, or anything else, you can use the site to find projects that suit your interests.</p>

<p>The doGoodr Fund is a registered 501&#40;c&#41;(3) nonprofit California public benefit corporation.</p>

<h3>About the project</h3>

<p>This project includes two web sites, <a href="http://dogoodr.org/">doGoodr</a> and the companion <a href="http://thedogoodrfund.org/">doGoodr Fund</a> informational site. Both are based on Ruby on Rails.</p>

<p>I am the sole front-end developer on the project and wrote around 99% of the <span class="caps">HTML </span>and <span class="caps">CSS, </span>as well as some supporting JavaScript, Rails view code, and controller logic. The team consists of myself, three other developers focusing on JavaScript and the Rails backend, and the founder of the project who also did the design work. The work has progressed through numerous design iterations to reach this stage and development is continuing post-launch, with an overhaul of some of the key interaction planned as well as continuous refinement.</p>

<p>I also serve in a general technical advisory role, helping to make decisions regarding various technologies and techniques used for the site, and as a standards and usability advocate.</p>

<h3>How you can help</h3>

<p>Get involved! Our launch last week was a &#8220;soft launch&#8221; with no public fanfare. This is the kind of project that increases in value as more people use it, so if you&#8217;ve got any sort of dream project, post it! Use of the site is free and you just may find the help you need.</p><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/hYawe1H3cPs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/dogoodr-launched/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/dogoodr-launched</feedburner:origLink></item>
		<item>
		<title>Asset Helper update</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/zn-Qjwz_mqA/asset-helper-update</link>
		<comments>http://www.corvidworks.com/articles/asset-helper-update#comments</comments>
		<pubDate>Mon, 01 Jun 2009 15:52:36 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[asset helper]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=165</guid>
		<description><![CDATA[Just last week I released Asset Helper, an implementation of some Rails AssetTagHelper methods in PHP. I wrote this for a Wordpress project and so making it a Wordpress plugin seemed natural. 

Upon review, there&#8217;s very little that&#8217;s Wordpress-specific about it &#8212; it&#8217;s aware of WP theme locations but that&#8217;s really it. So I figured [...]]]></description>
			<content:encoded><![CDATA[<p>Just last week I released <a href="http://www.corvidworks.com/articles/asset-helper">Asset Helper</a>, an implementation of some Rails AssetTagHelper methods in <span class="caps">PHP.</span> I wrote this for a Wordpress project and so making it a Wordpress plugin seemed natural. </p>

<p>Upon review, there&#8217;s very little that&#8217;s Wordpress-specific about it &#8212; it&#8217;s aware of WP theme locations but that&#8217;s really it. So I figured it would be more useful, both to myself and to others, as a general-purpose <span class="caps">PHP </span>library instead of just a Wordpress plugin. So I&#8217;ve just released <a href="http://labs.corvidworks.local/php/asset-helper/">Asset Helper 1.1</a> which removes the Wordpress requirement.</p>

<p>To use it on a non-Wordpress site, just place <code>asset-helper.php</code> somewhere your site can access it and include it before your site&#8217;s code begins:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">include_once</span> <span style="color: #0000ff;">'asset-helper.php'</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>It still works with Wordpress, of course, either as an external library as shown here or as a standard plugin. The plugin interface is recommended for WP sites, as this will let you take advantage of the update notifications, but it works either way.</p>

<p>Read my <a href="http://www.corvidworks.com/articles/asset-helper">Asset Helper overview</a> for general information and the <a href="http://labs.corvidworks.com/php/asset-helper/">function reference</a> for more details and an implementation guide.</p>

<h4><a href="http://wordpress.org/extend/plugins/asset-helper/">Download Asset Helper from the Wordpress plugin directory</a></h4><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/zn-Qjwz_mqA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/asset-helper-update/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/asset-helper-update</feedburner:origLink></item>
		<item>
		<title>Asset Helper plugin for Wordpress</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/-ZOO8yNZCR4/asset-helper</link>
		<comments>http://www.corvidworks.com/articles/asset-helper#comments</comments>
		<pubDate>Mon, 25 May 2009 18:56:14 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[asset helper]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=164</guid>
		<description><![CDATA[There was a good web site performance session at BarCamp Portland a couple weeks ago. It was led by a developer from Yahoo and covered the use of YSlow 2.0, the new version of Yahoo&#8217;s add-on to the Firebug Firefox extension, and how it can help you find areas in need of optimization on your [...]]]></description>
			<content:encoded><![CDATA[<p>There was a good web site performance session at <a href="http://barcamp.org/BarCampPortland">BarCamp Portland</a> a couple weeks ago. It was led by a developer from Yahoo and covered the use of <a href="http://developer.yahoo.com/yslow/">YSlow 2.0</a>, the new version of Yahoo&#8217;s add-on to the <a href="http://getfirebug.com/">Firebug</a> Firefox extension, and how it can help you find areas in need of optimization on your web sites.</p>

<p>One optimization that&#8217;s becoming more popular lately is the use of far-future expires headers for static files on your site. With a bit of web server configuration, you can instruct browsers to cache your images, stylesheets, JavaScript, and any other static files for as long as you wish, which results in faster page load times after the initial visit because the browsers won&#8217;t try to download new copies of these files. This can make a dramatic difference in load times for large, high-traffic sites but can also benefit smaller sites.</p>

<p>For Apache, this configuration might look something like this:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ExpiresActive On
<span style="color: #000000; font-weight: bold;">&lt;</span>FilesMatch <span style="color: #ff0000;">&quot;\.(ico|gif|jpe?g|png|js|css)$&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	ExpiresDefault <span style="color: #ff0000;">&quot;access plus 1 year&quot;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>FilesMatch<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>




<p>The one disadvantage to this practice is that sometimes these files change and you <em>want</em> your readers to get the latest versions. This is particularly the case with <span class="caps">CSS </span>which can change frequently as web sites evolve. This necessitates a way to instruct browsers to fetch new copies of these particular files despite the expiry time not yet being reached. A common method of doing this is by appending a query string to the file <span class="caps">URL</span>s that changes when the file does, thus giving the appearance of a different file.</p>

<p>An example of this would be something like:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; href=&quot;/css/main.css?v2.0&quot; type=&quot;text/css&quot; /&gt;</pre></div></div>




<p>This has the desired effect but requires an extra manual step of incrementing the version number each time the file changes, which is easy to forget to do. </p>

<p>A better approach is to have something appended automatically when a file changes. A great way of doing this is to code your site to automatically check the last-modified date of your static files and append a Unix timestamp in the query string:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;stylesheet&quot; href=&quot;/css/main.css?1242089980&quot; type=&quot;text/css&quot; /&gt;</pre></div></div>




<p>This value is guaranteed to increment when the file changes but will remain the same otherwise. Best of all, once you set it up you never have to touch it again.</p>

<h3>But how do I do that?</h3>

<p>Of course this doesn&#8217;t happen by itself; it requires some initial setup. If you&#8217;re working with Rails, this is done for you when you use certain asset helper methods, such as <code>stylesheet_link_tag</code> or <code>image_tag</code>. But what about <span class="caps">PHP </span>projects? CakePHP will do this as well but sometimes you don&#8217;t have the luxury of a framework like this.</p>

<h3>Asset Helper</h3>

<p><a href="http://labs.corvidworks.com/wordpress/asset-helper/">Asset Helper</a> is a Wordpress plugin that gives you exactly this. Just drop it in, activate it via the Wordpress plugins panel, and start using your new helper functions for your <span class="caps">CSS,</span> JavaScript, and images. Alternately, add it to your theme directory and load it via <code>include()</code> and you won&#8217;t even have to worry about activating it.</p>

<p>Once you have Asset Helper loaded, adding timestamped files is as easy as doing:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> stylesheet_tag<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'style.css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>



<p>Which will give you something like this:</p>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel='stylesheet' href='/wp-content/themes/theme-name/style.css?1242089980' type='text/css' /&gt;</pre></div></div>




<p>Actually, it&#8217;s even smarter than that example shows. If you just want to include the standard <code>style.css</code> for your current theme, just call the function without an argument &#8212; the plugin will figure it out. You can include files from anywhere by using filenames, relative paths, or paths from the site root. </p>

<p>Of course you can also do this with your JavaScript and images by using the <code>javascript_tag()</code> and <code>image_tag()</code> functions, which operate in a similar way.</p>

<p>Asset Helper is also aware of static asset hosts &#8212; those secondary hostnames you can use for your static files to allow for more concurrent downloads. Just define the <code>ASSET_HOST</code> constant in <code>wp-config.php</code> and the generated tags will automatically point to your asset host instead of the primary site&#8217;s hostname.</p>

<h3>How to use Asset Helper</h3>

<p>Complete documentation and lots of examples are available on the <a href="http://labs.corvidworks.com/php/asset-helper/">Asset Helper documentation page</a>. Asset Helper is released under the terms of the <a href="http://www.opensource.org/licenses/gpl-2.0.php"><span class="caps">GNU</span> General Public License (GPL) version 2</a>. If you find this plugin helpful, a link back to <a href="http://www.corvidworks.com/">my site</a> would be cool, but it&#8217;s not required.</p>

<h3>Update</h3>

<p>Asset Helper now works as a <a href="http://www.corvidworks.com/articles/asset-helper-update">stand-alone <span class="caps">PHP </span>library</a> as well as a Wordpress plugin. See the <a href="http://labs.corvidworks.com/php/asset-helper/">documentation page</a> for details (usage for WP sites hasn&#8217;t changed).</p>

<h4><a href="http://wordpress.org/extend/plugins/asset-helper/">Download Asset Helper from the Wordpress plugin directory</a></h4><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/-ZOO8yNZCR4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/asset-helper/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/asset-helper</feedburner:origLink></item>
		<item>
		<title>The NTP Pool Project</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/UZ2ebhiuIB0/ntp-pool-project</link>
		<comments>http://www.corvidworks.com/articles/ntp-pool-project#comments</comments>
		<pubDate>Fri, 22 May 2009 14:26:20 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=163</guid>
		<description><![CDATA[The NTP Pool Project, in their own words, &#8220;&#8230; is a big virtual cluster of timeservers striving to provide reliable easy to use NTP service for millions of clients without putting a strain on the big popular timeservers&#8221;.

I&#8217;ve been using the NTP pool on servers and workstations for years and have recently decided to give [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.pool.ntp.org/"><span class="caps">NTP</span> Pool Project</a>, in their own words, <span class="quote">&#8220;&#8230; is a big virtual cluster of timeservers striving to provide reliable easy to use <span class="caps">NTP </span>service for millions of clients without putting a strain on the big popular timeservers&#8221;</span>.</p>

<p>I&#8217;ve been using the <span class="caps">NTP </span>pool on servers and workstations for years and have recently decided to give something back to the project that&#8217;s been so helpful to me. So as of yesterday, one of my servers is part of the pool. You can see my server&#8217;s statistics on the <a href="http://www.pool.ntp.org/scores/8.12.34.236"><span class="caps">NTP </span>pool web site</a>.</p>

<h3>How to use the <span class="caps">NTP </span>pool</h3>

<p>Using the pool is easy: Just set your system&#8217;s timeserver to <code>pool.ntp.org</code>. Or, for better results, use one of the geographic zones such as <code>us.pool.ntp.org</code> (for the US), <code>de.pool.ntp.org</code> (for Germany), etc. In addition to the top-level global zone, there are zones for <a href="http://www.pool.ntp.org/zone/@">each continent</a>, and many country-level zones to choose from. My server is in the global, North America, and US zones.</p>

<p>The system works by using round-robin <span class="caps">DNS </span>to return a random IP address each time you resolve a <code>*.pool.ntp.org</code> hostname, which spreads the load over the entire network of time servers (additional scoring is done based on a number of other factors, but that&#8217;s the high-level overview).</p>

<p><a href="http://www.pool.ntp.org/use.html">More about using the <span class="caps">NTP </span>pool</a>.</p>

<h3>How to join the <span class="caps">NTP </span>pool</h3>

<p>To participate in the pool, you&#8217;ll need to configure your <span class="caps">NTP </span>daemon to sync with a few stratum 2 time servers, and then respond to outside requests. I won&#8217;t go into the details here but it&#8217;s a fairly simple process and is outlined well on the <span class="caps">NTP </span>pool web site.</p>

<p><a href="http://www.pool.ntp.org/join.html">More information on joining the pool</a>.</p>

<p>If you&#8217;ve got a server with some cycles and bandwidth to spare, consider joining the pool. The resource usage is minimal so it shouldn&#8217;t have much, if any impact on the real work your server is doing. Servers are especially needed in Africa and South America, but North America has fallen pretty far behind Europe as well so no matter where you are, you can help.</p><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/UZ2ebhiuIB0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/ntp-pool-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/ntp-pool-project</feedburner:origLink></item>
		<item>
		<title>Easy feed reading with SimplePie</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/SZKXnp6FPuQ/easy-feed-reading-with-simplepie</link>
		<comments>http://www.corvidworks.com/articles/easy-feed-reading-with-simplepie#comments</comments>
		<pubDate>Wed, 25 Mar 2009 15:47:51 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[simplepie]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=160</guid>
		<description><![CDATA[In an earlier article, I discuss a method of displaying Wordpress content on pages outside of WP. This method gives you access to the complete Wordpress API, including the header and footer functions, the loop, comments, and more. Basically anything you can do in a WP template, you can do in an external page using [...]]]></description>
			<content:encoded><![CDATA[<p>In an earlier article, I discuss a method of <a href="http://www.corvidworks.com/articles/wordpress-content-on-other-pages">displaying Wordpress content</a> on pages outside of <span class="caps">WP.</span> This method gives you access to the complete Wordpress <span class="caps">API, </span>including the header and footer functions, the loop, comments, and more. Basically anything you can do in a WP template, you can do in an external page using this method.</p>

<p>But that&#8217;s often overkill. In many cases you just want to display headlines or a single latest post and don&#8217;t <em>need</em> all this other stuff. Additionally, this method only allows you to display content from a single WP site. If you want headlines from more than one site, you&#8217;re out of luck.</p>

<h3><span class="caps">RSS </span>to the rescue</h3>

<p>It&#8217;s called <em>Really Simple Syndication</em> for a reason. If you just want content and don&#8217;t need all the other Wordpress functions, <span class="caps">RSS </span>is the way to go. You can show headlines and/or content from as many other sites as you want without incurring the overhead of loading the entire Wordpress framework, and you can cache the results so that pages loads are nice and quick.</p>

<h3>Introducing SimplePie</h3>

<p>Admittedly, this is a late introduction. <a href="http://simplepie.org/">SimplePie</a> has been around for a few years now but it&#8217;s not as widely used as it maybe should be. It&#8217;s a great way to display external <span class="caps">RSS </span>or Atom feeds with a minimum of hassle. At it&#8217;s most basic, you can do this with just half a dozen lines of code. Let&#8217;s see how.</p>

<p>First, you need to <a href="http://simplepie.org/downloads/">download the SimplePie library</a>. Unzip the file and copy <code>simplepie.inc</code> somewhere accessible to your web site. For this example, we&#8217;ll put it in a directory called <code>/inc</code> just inside your site&#8217;s DocumentRoot. I rename mine to <code>simplepie.php</code> for consistency with other libraries I use, but that&#8217;s not necessary. Here we&#8217;ll stick with the default <code>.inc</code> <br />
extension.</p>

<p>In this article, I will show how to do four things commonly done with <span class="caps">RSS </span>feeds on the web.</p>


<ol>
<li>Show the five latest headlines</li>
<li>Displaying the full content of the single latest post</li>
<li>How to display two feeds on a single page</li>
<li>Combining headlines from two feeds into a single list</li>
</ol>



<h3>A note about caching</h3>

<p>SimplePie provides a great caching mechanism so that feeds don&#8217;t have to be retrieved on every page load. This requires a writable directory on the server where the feeds can be stored. By default this location is <code>./cache</code>, meaning a directory called &#8220;cache&#8221; in the same directory as the file calling <code>simplepie.inc</code>. Be sure your web server can write to this directory, either by changing the permissions, ownership, or some other means, as appropriate for your setup.</p>

<p>The default cache time is one hour. Both this and the cache location are customizable but we&#8217;ll be sticking with the defaults here. See the <a href="http://simplepie.org/wiki/reference/start">SimplePie <span class="caps">API </span>reference</a> for details when you&#8217;re ready to dig into this.</p>

<h3>Getting started</h3>

<p>So here we go. First, load SimplePie by adding this line to the top of the <span class="caps">PHP </span>page you&#8217;ll be using it on:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #b1b100;">include_once</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'DOCUMENT_ROOT'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/inc/simplepie.inc'</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>Once it&#8217;s loaded, we&#8217;ll add a second line to create our SimplePie object and give it the location of the <span class="caps">RSS </span>or Atom feed we&#8217;d like to display:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #b1b100;">include_once</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'DOCUMENT_ROOT'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/inc/simplepie.inc'</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$feed</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://feeds.corvidworks.com/CorvidWorks'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>That&#8217;s all the prep work we need. Unless otherwise noted, you&#8217;ll use this code for all the examples below.</p>

<p>We now have the feed loaded and we can start playing with the contents. </p>

<h3>Example One &#8211; Display five latest headlines</h3>

<p>For this first example we&#8217;re simply going to display five recent headlines. A typical use case for this might be a someone who wants to automatically link to their latest blog content on another site or on a non-Wordpress page on the same site.</p>

<p>Once the above code is in place, we can start printing out the contents of the feed. First, we&#8217;ll probably want to display the title of the feed itself. For a Wordpress-based site, this is the same as the blog name.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;</pre></div></div>




<p>Now let&#8217;s get the contents. To do this, we&#8217;ll retrieve an array of posts from the SimplePie object and iterate through them.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_items</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;li&gt;
        &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_permalink</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
    &lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>



<p>(I broke the list item up into multiple lines so it&#8217;s easier to read.)</p>

<p>In the above code, you can see our call to SimplePie&#8217;s <code>get_items()</code> method. Call this method without the optional arguments will retrieve the entire feed, or pass arguments to get exactly what you want. The first argument specifies the element to start with. Remember, arrays begin with zero so use 0 here to start with the latest post. The second argument is the number of items you want &#8212; we&#8217;re using 5 for this example; use 10 if you want a longer list, 1 if you want a single item, or whatever is appropriate for your needs.</p>

<p>That&#8217;s it! You&#8217;ve now got a list of headlines, linked to the articles on the original site. </p>

<h3>Example Two &#8211; Display the latest post content</h3>

<p>Displaying the latest full post is pretty similar to the above but we&#8217;ll be introducing a couple new methods to retrieve a single post and display the post body (&#8220;description&#8221;, in <span class="caps">RSS </span>terminology).</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;h1&gt;Latest post from <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$item</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$feed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_item</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_description</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>The interesting thing here is that we&#8217;re calling <code>get_item()</code> rather than <code>get_items()</code> (singular instead of plural). By default, this method will return the first item in the feed, which is your most recent post. Add an optional argument of a single integer to specify a different post. </p>

<p>The remaining code is basically the same. We&#8217;re using the same method to display the title but have added a call to <code>get_description()</code> for the post body.</p>

<h3>Example Three &#8211; Show headlines from two feeds</h3>

<p>A common use case for SimplePie is to display headlines from a number of sources. Say you&#8217;ve got a person web site that you want to show headlines from the various blogs you write for. Building on what we&#8217;ve done so far, this is no problem at all. Let&#8217;s see how.</p>

<p>Back up near the beginning of this article, I showed how to include the SimplePie object and instantiate an object for the feed you wish to display. We&#8217;re going to make a small change to that code here and also create a second SimplePie object for the new feed we&#8217;ll be adding.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #b1b100;">include_once</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'DOCUMENT_ROOT'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/inc/simplepie.inc'</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$feed1</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://feeds.corvidworks.com/CorvidWorks'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$feed2</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://feeds.corvidworks.com/Cocktailia'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>So now we&#8217;ve got <code>$feed1</code> and <code>$feed2</code>, two SimplePie objects for our two feeds. From here you just follow the <em>five latest headlines</em> instructions above, but using that block twice on your page, using the two different <em>feed</em> variables we&#8217;ve created here.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;!-- First feed - note use of &quot;feed1&quot; --&gt;
&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$feed1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed1</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_items</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;li&gt;
        &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_permalink</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
    &lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;
&nbsp;
&lt;!-- Second feed - note use of &quot;feed2&quot; --&gt;
&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$feed2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed2</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_items</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;li&gt;
        &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_permalink</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
    &lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>




<h3>Example Four &#8211; Combine headlines from multiple feeds</h3>

<p>For our final example, we&#8217;re going to combine headlines from two feeds into a single list. You might do this if you&#8217;ve got multiple feeds on a similar topic (entirely unlike the feeds I&#8217;m using in this example). Once again, we&#8217;ll be changing how we instantiate our SimplePie object, this time passing an array of <span class="caps">URL</span>s instead of a single one.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #b1b100;">include_once</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'DOCUMENT_ROOT'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/inc/simplepie.inc'</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$feeds</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'http://feeds.corvidworks.com/CorvidWorks'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'http://feeds.corvidworks.com/Cocktailia'</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>




<p>This results in a single object containing data from two feeds, instead of one object for each individual feed. Now we can display them as usual.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$feeds</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_items</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;li&gt;
        &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_permalink</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
    &lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>




<p>You won&#8217;t use <code>get_title()</code> here, as there is no one single title for multiple feeds. You also may want to increase the number of headlines you&#8217;re showing so you get a good sample from each feed. Note that these are displayed in date order so you may have an uneven number of posts from each (real world usage of this example gives me three headlines from this site and seven from <a href="http://www.cocktailia.com/">Cocktailia</a>).</p>

<h3>Further reading</h3>

<p>These examples are intentionally basic but they should cover the most common use cases for SimplePie. Once you&#8217;ve tried these things and familiarized yourself with how it works, your next stop should be the SimplePie web site itself, where they&#8217;ve got some <a href="http://simplepie.org/wiki/">very good documentation</a>, a <a href="http://simplepie.org/wiki/reference/start">complete <span class="caps">API </span>reference</a>, and lots of examples. Have fun!</p><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/SZKXnp6FPuQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/easy-feed-reading-with-simplepie/feed</wfw:commentRss>
		<slash:comments>47</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/easy-feed-reading-with-simplepie</feedburner:origLink></item>
		<item>
		<title>Introducing Mosso Cloud Servers</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/BtJpjHRnj20/mosso-cloud-servers</link>
		<comments>http://www.corvidworks.com/articles/mosso-cloud-servers#comments</comments>
		<pubDate>Fri, 20 Mar 2009 17:50:44 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=159</guid>
		<description><![CDATA[I&#8217;m a big fan of Slicehost and I&#8217;ve heard nothing but good things about Rackspace, so when it was announced last October that Rackspace had acquired Slicehost I began eagerly looking forward to the new services this team could offer.

This week the first of these was announced: Mosso Cloud Servers.

About Mosso Cloud Servers

Mosso is a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of <a href="http://www.slicehost.com/">Slicehost</a> and I&#8217;ve heard nothing but good things about <a href="http://www.rackspace.com/">Rackspace</a>, so when it was announced last October that <a href="http://www.slicehost.com/articles/2008/10/22/big-news-today">Rackspace had acquired Slicehost</a> I began eagerly looking forward to the new services this team could offer.</p>

<p>This week the first of these was announced: <a href="http://www.mosso.com/cloudservers.jsp">Mosso Cloud Servers</a>.</p>

<h3>About Mosso Cloud Servers</h3>

<p><a href="http://www.mosso.com/">Mosso</a> is a Rackspace-owned company who specializes in &#8220;cloud&#8221; hosting services. <a href="http://www.mosso.com/cloudfiles.jsp">Cloud Files</a> is a static file Content Delivery Network (CDN), similar to Amazon&#8217;s S3 service, and <a href="http://www.mosso.com/cloud.jsp">Cloud Sites</a> is an interesting take on managed hosting. Cloud Servers is the latest addition to the family.</p>

<p>At first glance, Cloud Servers looks like pretty much just another <span title="Virtual Private Servers"><span class="caps">VPS</span></span> service. But the interesting thing is that they&#8217;re priced on a utility model, starting at $0.015/hour with bandwidth added on at $0.08/GB incoming and $0.22/GB outgoing, all billed at the end of the month. So you pay as you go, and only pay for what you use.</p>

<p>Running the numbers gives us a base rate of $10.95/month for the server plus bandwidth. A low-traffic server using, say, 10 GB outgoing bandwidth per month, will cost a little over $13/month. Not a bad deal. You&#8217;ll have to use around 40 GB per month before you approach the $20/month range which is the standard price for a low-end <span class="caps">VPS.</span></p>

<h3>Built on Slicehost</h3>

<p>Upon closer inspection, it becomes apparent that this service is built entirely on the Slicehost platform. The service levels are the same, the Linux distributions offered are the same, the web-based control panel looks very similar (except that it appears to have been rewritten in Java for the Mosso services), and most tellingly, the IP address I was assigned when I ordered one resolved back to the <code>.slicehost.net</code> domain. I even found the word &#8220;slice&#8221; in one or two places around the control panel.</p>

<h3>What does this mean for Slicehost?</h3>

<p>Probably not much, really. Slicehost and Mosso are sister companies in the Rackspace family, and you&#8217;re ultimately doing business with Rackspace no matter which one you choose. While it&#8217;s possible that a decreased interest in Slicehost&#8217;s offerings may not bode well for the future of the company, that&#8217;s something that&#8217;s quite a ways down the road. I think the target markets for these two competing services are different enough that it won&#8217;t be a problem.</p>

<h3>Which one do I choose?</h3>

<p>As an end-user wanting to use Slicehost&#8217;s service, you now have more choice. You&#8217;re getting the same thing either way, so the two remaining questions are a) whether you&#8217;d like to use other Mosso Cloud services such as the <span class="caps">CDN, </span>and b) how much traffic your server will get. </p>

<p>The new Mosso control panel controls all the Cloud family offerings, so this might be a good way to go if you expect to use Cloud Files as well. On the other hand, if you expect to run a high-traffic server you just might want to stick with Slicehost for the higher bundled bandwidth.</p>

<p>Whichever you choose, you&#8217;ll be getting the same great service you&#8217;ve come to expect from both Slicehost and Rackspace, so you really can&#8217;t lose.</p>

<p><strong>Update (July 8, 2009):</strong> The Mosso family of services has now been rebranded as <a href="http://blog.mosso.com/2009/07/from-mosso-to-the-rackspace-cloud/">The Rackspace Cloud</a>.</p><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/BtJpjHRnj20" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/mosso-cloud-servers/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/mosso-cloud-servers</feedburner:origLink></item>
		<item>
		<title>Corvid Works is relocating!</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/eDCcZYyAm9k/corvid-works-is-relocating</link>
		<comments>http://www.corvidworks.com/news/corvid-works-is-relocating#comments</comments>
		<pubDate>Fri, 13 Mar 2009 17:56:53 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Important News and Announcements]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=156</guid>
		<description><![CDATA[Exciting news! At the end of March, Corvid Works will be relocating from San Francisco to beautiful Portland, Oregon.

Due to the largely remote nature of my work, this probably doesn&#8217;t mean much to current clients, except that I now have a new telephone number and mailing address. I will still be traveling for in-person meetings [...]]]></description>
			<content:encoded><![CDATA[<p>Exciting news! At the end of March, Corvid Works will be relocating from San Francisco to beautiful Portland, Oregon.</p>

<p>Due to the largely remote nature of my work, this probably doesn&#8217;t mean much to current clients, except that I now have a new telephone number and mailing address. I will still be traveling for in-person meetings for projects that require it.</p>

<p>I&#8217;ve <a href="http://www.corvidworks.com/files/kenn-wilson.vcf">updated my vCard</a>, and it&#8217;s ready to be imported into the address book of your choice. My new mailing address will also appear on all future invoices.</p>

<p>Nothing else is changing, I&#8217;ll still be available to help you out with whatever your project needs. </p>

<p>As always, you can keep on top of what I&#8217;m doing by <a href="http://feeds.corvidworks.com/CorvidWorks">subscribing to my <span class="caps">RSS </span>feed</a>.</p><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/eDCcZYyAm9k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/news/corvid-works-is-relocating/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/news/corvid-works-is-relocating</feedburner:origLink></item>
		<item>
		<title>E-mail deliverability tip</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/QH1EzMr_ONU/mail-deliverability-tip</link>
		<comments>http://www.corvidworks.com/articles/mail-deliverability-tip#comments</comments>
		<pubDate>Tue, 24 Feb 2009 15:56:05 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=154</guid>
		<description><![CDATA[An question frequently seen on support forums for Linux VPS providers like Slicehost and Linode is that of e-mail deliverability. &#8220;E-mail deliverability&#8221; refers to how reliably your mail will be delivered to its intended recipients while avoiding being filtered as spam.

Note: If you&#8217;re here looking for spamming tips, keep moving.

With that out of the way, [...]]]></description>
			<content:encoded><![CDATA[<p>An question frequently seen on support forums for Linux <span class="caps">VPS </span>providers like <a href="http://www.slicehost.com/">Slicehost</a> and <a href="http://www.linode.com/?r=074a2130edd3641ef96331d954ff2007418c7577">Linode</a> is that of e-mail deliverability. &#8220;E-mail deliverability&#8221; refers to how reliably your mail will be delivered to its intended recipients while avoiding being filtered as spam.</p>

<p>Note: If you&#8217;re here looking for spamming tips, keep moving.</p>

<p>With that out of the way, one of the simplest ways to improve the ability of your <span class="caps">VPS </span>to deliver mail to others is to make sure your hostnames are in order. This is one of the most often overlooked steps, yet it can be fixed in under two minutes. Executive summary: your <span class="caps">MTA </span>should identify itself with a fully-qualified hostname, this name should resolve to your server&#8217;s IP address, and your IP address should reverse-resolve back to this name. </p>

<p>Here&#8217;s how to check if you need this, and how to fix it if you do. All the following commands are run after connecting to your server via <span class="caps">SSH.</span> Commands that require elevated privileges are prefixed with &#8220;sudo&#8221;. These examples use Ubuntu Linux with Postfix, but this advice applies to any internet server that needs to deliver mail, even Windows (but Windows admins will have to figure out how to do it on their own).</p>

<p>First, let&#8217;s see what your server&#8217;s hostname actually is.</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">hostname</span>
milan.corvidworks.net</pre></div></div>




<p>The value of <code>hostname</code> should be a <a href="http://en.wikipedia.org/wiki/Fully_qualified_domain_name">fully-qualified domain name</a> (FQDN), meaning one containing both host and domain parts. In this real-life example, this server&#8217;s hostname is <em>milan</em> and the domain is <em>corvidworks.net</em>.</p>

<p>If your server returns a single name (&#8220;foo&#8221;) or just a second-level domain name (&#8220;example.com&#8221;), the first thing you need to do is change it, substituting your desired name. Feel free to be creative here &#8212; too many people name their servers &#8220;server1&#8243; or similar. I name all my machines after cities, for example. Best practice is to use a name that is <em>not</em> related to any services you&#8217;re running, so don&#8217;t name it &#8220;www.example.com&#8221; either. This name does not need to relate to the From: address your mail is using, or to any web site you&#8217;re hosting.</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">hostname</span> foo.example.com</pre></div></div>




<p>Depending on your OS/distro, you may now need to edit a couple files as well. Your <code>/etc/hostname</code> file should read:</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">foo.example.com</pre></div></div>




<p>and your <code>/etc/hosts</code> should include the line:</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">127.0.0.1    foo    foo.example.com</pre></div></div>




<p>Once that&#8217;s done, you should see results similar to the following, again with your own hostname instead of mine:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">hostname</span>
milan.corvidworks.net
$ <span style="color: #c20cb9; font-weight: bold;">hostname</span> <span style="color: #660033;">-s</span>
milan</pre></div></div>




<p>Now that the system knows its own name, let&#8217;s move on to your <span class="caps">MTA.</span> I&#8217;m using Postfix but the principles applies to any <span class="caps">MTA, </span>although the instructions will differ. In <code>/etc/postfix/main.cf</code> find the <code>$myhostname</code> line and change it to match the <span class="caps">FQDN </span>you set for the server, and set <code>$myorigin</code> to match.</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">myhostname = milan.corvidworks.net 
myorigin   = $myhostname</pre></div></div>




<p>Debian and Debian-based systems, such as Ubuntu, get <code>$myorigin</code> from <code>/etc/mailname</code> by default. Feel free to update or create that file or just change the value as shown here.</p>

<p>If this server is not handling mail for your domain, make sure <code>$mydestination</code> is correct. Unless you want mail to your own domain delivered locally, your domain name alone should not appear in this line.</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mydestination = $myhostname, localhost.$mydomain, localhost</pre></div></div>




<p>Restart Posfix and make sure it&#8217;s identifying itself correctly by connecting to port 25. You should see the fully-qualified name you entered above in the <span class="caps">SMTP </span>banner:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> postfix reload
postfix<span style="color: #000000; font-weight: bold;">/</span>postfix-script: refreshing the Postfix mail system
&nbsp;
$ telnet localhost <span style="color: #000000;">25</span>
Trying 127.0.0.1...
Connected to localhost.
Escape character is <span style="color: #ff0000;">'^]'</span>.
<span style="color: #000000;">220</span> milan.corvidworks.net ESMTP Postfix</pre></div></div>



<p>(type &#8220;quit&#8221; to end the <span class="caps">SMTP </span>session)</p>

<p>Still with me? Great. The work on your server is done and all that&#8217;s left is <span class="caps">DNS.</span> This step is going to vary greatly depending on your specific setup, so I can&#8217;t give any real instructions here other than tell you what you need. There are two records that need to be set:</p>


<ul>
<li>An A record pointing your fully-qualified hostname to your server&#8217;s IP address</li>
<li>A <span class="caps">PTR </span>record (&#8220;reverse <span class="caps">DNS</span>&#8220;) pointing your server&#8217;s IP address back to that same <span class="caps">FQDN </span></li>
</ul>



<p>The A record will be set up where ever your <span class="caps">DNS </span>is managed. This may be at your <span class="caps">VPS </span>provider, your domain registrar, or a third-party <span class="caps">DNS </span>hosting company such as <span class="caps">DNS</span> Made Easy. The <span class="caps">PTR </span>record will be set up by your <span class="caps">VPS </span>host. They may offer a way to do this via some sort of control panel, but failing that a support ticket should take care of it. If they don&#8217;t offer this service, find a new hosting company.</p>

<p>And that&#8217;s it. Give the new <span class="caps">DNS </span>records a chance to propagate and you&#8217;ll be able to verify them using <em>host</em>. New records should be visible almost immediately, while changes may take up to 24 &#8211; 48 hours.</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ host milan.corvidworks.net
milan.corvidworks.net has address 65.49.60.34
&nbsp;
$ host 65.49.60.34
34.60.49.65.in-addr.arpa domain name pointer milan.corvidworks.net.</pre></div></div>




<p>And that&#8217;s it! Doing this won&#8217;t magically guarantee that your mail will be delivered but it will definitely increase your chances.</p><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/QH1EzMr_ONU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/mail-deliverability-tip/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/mail-deliverability-tip</feedburner:origLink></item>
		<item>
		<title>Giving Wordpress its own directory</title>
		<link>http://feeds.corvidworks.com/~r/CorvidWorks/~3/4YFJN1VBSJ8/giving-wordpress-its-own-directory</link>
		<comments>http://www.corvidworks.com/articles/giving-wordpress-its-own-directory#comments</comments>
		<pubDate>Wed, 29 Oct 2008 18:05:07 +0000</pubDate>
		<dc:creator>Kenn</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.corvidworks.com/?p=120</guid>
		<description><![CDATA[Organization is important to me, so something I look for when installing third-party web applications is the ability to keep the application&#8217;s files cleanly separated from my own data and any additional files I&#8217;m using on the site. Sadly, most applications don&#8217;t support this very well but Wordpress is an exception. Wordpress provides the ability [...]]]></description>
			<content:encoded><![CDATA[<p>Organization is important to me, so something I look for when installing third-party web applications is the ability to keep the application&#8217;s files cleanly separated from my own data and any additional files I&#8217;m using on the site. Sadly, most applications don&#8217;t support this very well but Wordpress is an exception. Wordpress provides the ability to keep your installation in a subdirectory out of the way of the rest of your site while allowing you to display your blog content at the root level. This keeps your web directory cleaner and reduces the risk of important files being modified or deleted accidentally.</p>

<p>This procedure is <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">well documented</a> on the Wordpress Codex but I&#8217;m writing it up here as well, as it&#8217;s a prerequisite to some other Wordpress techniques I&#8217;ll be discussing and would like to keep the instruction all in one place.</p>

<div class="terminology_note">
<h3>A note about terminology</h3>
In this, as well as all my tutorials, I use the domain name <em>example.org</em> to refer to your domain. When you see this, substitute your actual domain name. As well, in this article I will assume we&#8217;re installing Wordpress into a directory called <em>/wordpress</em>. If you use a different name for your Wordpress folder, just replace &#8220;wordpress&#8221; in any paths below with whatever name you chose.<br />
</div>

<h3>Portable Wordpress configuration file</h3>

<p>This article also strongly recommends using the WP_SITEURL and WP_HOME constants in order to make your Wordpress configuration file more portable, which has the added benefit of making this sort of setup even easier, particularly for those modifying an existing Wordpress site. For background, read my <a href="http://www.corvidworks.com/articles/portable-wordpress-config">portable Wordpress configuration</a> article but if you&#8217;d rather just get to it, add the following two lines to your <code>wp-config.php</code> file, replacing &#8220;wordpress&#8221; in the first line to whatever directory you want to keep your Wordpress files in.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// ** Hostname settings ** //</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_SITEURL'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;http://<span style="color: #006699; font-weight: bold;">${_SERVER['HTTP_HOST']}</span>/wordpress&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'WP_HOME'</span><span style="color: #339933;">,</span>    <span style="color: #0000ff;">&quot;http://<span style="color: #006699; font-weight: bold;">${_SERVER['HTTP_HOST']}</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<h3>New Wordpress installations</h3>

<p>It&#8217;s easy. First, simply unpack Wordpress into a subdirectory of your site. Then all you have to do is copy the <code>index.php</code> file from the WP directory into the root directory of your site, and make a single change. Look for this line:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/** Loads the WordPress Environment and Template */</span>
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./wp-blog-header.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>And change it to this, replacing &#8220;wordpress&#8221; in the path to whatever directory you installed WP into.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/** Loads the WordPress Environment and Template */</span>
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./wordpress/wp-blog-header.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>And that&#8217;s it! Your blog content will now appear at the root of your site, and your admin area is now at <code>http://www.example.org/wordpress/wp-admin/</code>.</p>

<h3>Moving your existing Wordpress installation</h3>

<p>Rearranging an existing Wordpress site is a bit trickier than doing this with a clean installation, but don&#8217;t let this deter you. It&#8217;s still pretty straight-forward. As above, the first thing you should do is modify your <code>wp-config.php</code> file with the code shown above. This will save you the step of changing the <span class="caps">URL </span>settings in the WP administration section.</p>

<p>Once you&#8217;ve done this, create the folder you would like to store Wordpress in, making sure the name you choose is the same one you specified in the WP_SITEURL line in your config file. Then move (not copy) all your Wordpress files into this new folder. On a typical Wordpress 2.6 installation, these files include:</p>


<ul>
<li>Three folders: <code>wp-admin</code>, <code>wp-content</code>, and <code>wp-includes</code></li>
<li>Any files beginning with &#8220;wp-&#8221; and ending with &#8220;.php&#8221; (eg, <code>wp-app.php</code>, <code>wp-atom.php</code>, etc)</li>
<li><code>index.php</code></li>
<li><code>xmlrpc.php</code></li>
</ul>



<p>The license.txt and readme.html files can be moved, deleted, or ignored, as you wish.</p>

<p>Once these files have been moved, <em>copy</em> (not move) that <code>index.php</code> back into the root directory and open it up in a text editor. Look for this line:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/** Loads the WordPress Environment and Template */</span>
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./wp-blog-header.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>And change it to this, replacing &#8220;wordpress&#8221; in the path to whatever folder you just moved your Wordpress files into.</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/** Loads the WordPress Environment and Template */</span>
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'./wordpress/wp-blog-header.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>No changes to your <code>.htaccess</code> file are necessary. Your admin area is now at <code>http://www.example.org/wordpress/wp-admin/</code> but you should now see your blog appearing at the root of your site, just the way it always has.</p>

<p>Now that Wordpress is cleanly tucked away into it&#8217;s own folder, your web site directory is cleaner and more organized, you will now have an easier time updating Wordpress, and the way is paved for doing easier maintenance using some new features of WP 2.6.</p><img src="http://feeds.feedburner.com/~r/CorvidWorks/~4/4YFJN1VBSJ8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.corvidworks.com/articles/giving-wordpress-its-own-directory/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		<feedburner:origLink>http://www.corvidworks.com/articles/giving-wordpress-its-own-directory</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 4.849 seconds. --><!-- Cached page generated by WP-Super-Cache on 2010-03-12 04:21:00 -->
