<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Ryan Bosinger</title>
	<atom:link href="http://ryanbosinger.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanbosinger.com/blog</link>
	<description>things I learn, as I learn them</description>
	<lastBuildDate>Wed, 20 Jan 2010 19:38:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Life of Shakespeare</title>
		<link>http://ryanbosinger.com/blog/2009/the-life-of-shakespeare/</link>
		<comments>http://ryanbosinger.com/blog/2009/the-life-of-shakespeare/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 05:19:28 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=122</guid>
		<description><![CDATA[

I made this Flash e-learning project years ago for a college assignment.  It&#8217;s fully animated with quiz sessions by a bogus Bill Cosby.  For some reason, even though I put a ton of work into it and everybody liked it, I never thought much of it myself.  Now, several years later I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ryanbosinger.com/blog/wp-content/uploads/2009/12/shake.png"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2009/12/shake.png" alt="The life of shakespeare" title="The life of shakespeare" width="439" height="352" class="aligncenter size-full wp-image-123" /></a></p>

<p>I made this Flash e-learning project years ago for a college assignment.  It&#8217;s fully animated with quiz sessions by a bogus Bill Cosby.  For some reason, even though I put a ton of work into it and everybody liked it, I never thought much of it myself.  Now, several years later I pulled it back up and laughed my ass off.</p>


<p>It&#8217;s been sitting on my server all ready to show off for years, but I thought I&#8217;d give a shout out to it on this blog.  Maybe someone can learn something!</p>

<p><strong>Check out <a href="http://www.ryanbosinger.com/shakespeare/shakespeare.html">The Life of Shakespeare</a></strong></p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/the-life-of-shakespeare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bosinger Xmas Tree 2009</title>
		<link>http://ryanbosinger.com/blog/2009/bosinger-xmas-tree-2009/</link>
		<comments>http://ryanbosinger.com/blog/2009/bosinger-xmas-tree-2009/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 05:29:37 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Random Thoughts]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=119</guid>
		<description><![CDATA[ 

I attempted to take an HDR photo of our Christmas tree.  It didn&#8217;t work out too well, so instead I just played with what I had to make a somewhat surreal image.  Merry Christmas!]]></description>
			<content:encoded><![CDATA[<a href="http://www.flickr.com/photos/29012206@N08/4183324619/" class="tt-flickr tt-flickr-Large" title="Bosinger Christmas Tree 2009"><img class="aligncenter" src="http://farm5.static.flickr.com/4040/4183324619_ee9ba4c6fc_b.jpg" alt="Bosinger Christmas Tree 2009" width="683" height="1024" /></a> 

<p>I attempted to take an HDR photo of our Christmas tree.  It didn&#8217;t work out too well, so instead I just played with what I had to make a somewhat surreal image.  Merry Christmas!</p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/bosinger-xmas-tree-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 external hard drive won&#8217;t show in Computer</title>
		<link>http://ryanbosinger.com/blog/2009/windows-7-external-hard-drive-wont-show-in-computer/</link>
		<comments>http://ryanbosinger.com/blog/2009/windows-7-external-hard-drive-wont-show-in-computer/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 20:54:15 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=114</guid>
		<description><![CDATA[Just had a problem with getting my Iomega USB hard drive to be recognized by Windows 7.

Actually, the first time I plugged it in it did show up, but then something unrelated happened, something crashed and the drive refused to ever mount again.

I opened up the Device Manager (Start -> Control Panel -> Hardware and [...]]]></description>
			<content:encoded><![CDATA[<p>Just had a problem with getting my Iomega USB hard drive to be recognized by Windows 7.</p>

<p>Actually, the first time I plugged it in it <em>did</em> show up, but then something unrelated happened, something crashed and the drive refused to ever mount again.</p>

<p>I opened up the <strong>Device Manager</strong> (Start -> Control Panel -> Hardware and Sound -> Device Manager) and then expanded the <strong>Disk drives</strong> section.  It looked like this:</p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2009/12/device_manager_01.PNG"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2009/12/device_manager_01.PNG" alt="device_manager_01" title="device_manager_01" width="372" height="207" class="aligncenter size-full wp-image-115" /></a></p>

<p>I guessed the one marked USB was my external drive, right-clicked and hit <em>Uninstall</em></p>

<p>
<a href="http://ryanbosinger.com/blog/wp-content/uploads/2009/12/device_manager_02.PNG"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2009/12/device_manager_02.PNG" alt="device_manager_02" title="device_manager_02" width="428" height="271" class="aligncenter size-full wp-image-116" /></a></p>

<p>I then unplugged me external drive, waited a couple seconds and plugged it back in.  Windows automatically reinstalled this driver and now everything works properly.</p>

]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/windows-7-external-hard-drive-wont-show-in-computer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 (make Windows default boot)</title>
		<link>http://ryanbosinger.com/blog/2009/ubuntu-9-10-make-windows-default-boot/</link>
		<comments>http://ryanbosinger.com/blog/2009/ubuntu-9-10-make-windows-default-boot/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 20:01:27 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=108</guid>
		<description><![CDATA[My experience installing Unbuntu after a fresh install of Windows 7 and then trying to return Windows 7 to the default boot.  I ramble for a moment, but feel free to skip down to the list for instructions.


Hello all.  Just last night I decided to reformat my parent&#8217;s/sister&#8217;s machine and install a new [...]]]></description>
			<content:encoded><![CDATA[<p><strong>My experience installing Unbuntu <em>after</em> a fresh install of Windows 7 and then trying to return Windows 7 to the default boot.  I ramble for a moment, but feel free to skip down to the list for instructions.</strong></p>

<span id="more-108"></span>
<p>Hello all.  Just last night I decided to reformat my parent&#8217;s/sister&#8217;s machine and install a new copy of Windows 7.  It was just slow and corrupted in a variety of ways and needed to be done.</p>

<p>Anyways, I thought &#8220;Hey, maybe I should partition away 10-20 gigs and install Ubuntu on there too&#8221;.  I know they&#8217;ll never use it and I wouldn&#8217;t recommend they do (they&#8217;ll get confused&#8230;) but I thought I&#8217;d like to fool around with it a bit.  Plus, if Windows gets bunged up I can tell them to boot up Ubuntu and at least they&#8217;ll have Firefox and OpenOffice to use without any issues.</p>

<p>Well, so far I&#8217;m pretty impressed with Ubuntu.  Although I&#8217;m pretty impressed with Windows 7 too.  Actually, I like MacOs too.  I&#8217;m not really a fanatic about OS&#8217;s in general.  I plan on eventually transcending the OS by connecting my brain directly to the motherboard and communicating to it using telepathic musical tones.  My productivity should then increase by <em>at least</em> 15%.</p>

<p>Now, on to the point&#8230;.  Although Ubuntu installed very nicely and easily and configured it&#8217;s boot loader to allow me to choose Windows 7 on startup, it &#8211; naturally &#8211; made itself default.  It seems the way to change this may have recently changed in Ubuntu (I&#8217;m using 9.10).  Here&#8217;s how I did it:</p>

<ol>
	<li>Go Application -> Accessories -> Terminal</li>
        <li>Type this (it may ask you for your admin password):</li>
        <p><code>sudo gedit /etc/default/grub</code></p>
        <li>Find this:</li>
        <p><code>GRUB_DEFAULT=0</code></p>
        <li>Change the number to correspond to the placement of your desired OS in the boot menu that comes up at start up.  Mine was 7 because I was messing around and Windows 7 happened to come up 7th in the list.  Most likely yours will be 4.</li>
<li>Save and close.</li>
<li>Go have a poptart.</li>
<li>Type this:</li>
<p><code>SUDO UPDATE-GRUB</code></p>
<li>Restart and you&#8217;ll find the boot menu will highlight your choice as default.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/ubuntu-9-10-make-windows-default-boot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hayden &#8211; Let&#8217;s Break Up &#8211; Chords</title>
		<link>http://ryanbosinger.com/blog/2009/hayden-lets-break-up-chords/</link>
		<comments>http://ryanbosinger.com/blog/2009/hayden-lets-break-up-chords/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 18:50:46 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[Guitar]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=101</guid>
		<description><![CDATA[A friend and I have been practicing this newer Hayden song, Let&#8217;s Break Up.  A Google search for the lyrics and/or other tabs came up with nothing for me &#8211; but it looks likes people are looking for it &#8211; so I thought I&#8217;d share.  It&#8217;s just the lyrics and basic chords here [...]]]></description>
			<content:encoded><![CDATA[<p>A friend and I have been practicing this newer Hayden song, <em>Let&#8217;s Break Up</em>.  A Google search for the lyrics and/or other tabs came up with nothing for me &#8211; but it looks likes people are looking for it &#8211; so I thought I&#8217;d share.  It&#8217;s just the lyrics and basic chords here but there&#8217;s not much more to it.  This should get you started.</p>

<p>The lyrics here are what we heard and wrote down while having some beers and jamming, so they might not be 100%.  I never even thought to look in the CD booklet until now&#8230; but I&#8217;ll update this later if they&#8217;re in there.</p> 
<span id="more-101"></span>
<pre>

-- Capo on 1st --

-- Intro: G chord with hammer-ons on the A string --


G      D          C        B7     C
I suppose there's nothing more between us,

  G         D      C       B7       C
when all we do is fill the room with sadness.

     G        D      C       B7       C
It's getting hard to find the words to make-up,

  Am
let's break up


G                D         B7        C
if you're gonna leave me, don't be teasing

G           D        C
you need to take a stand

G               D        B7        C
if you're gonna mess up, give me a heads up

G         D         C
I need to make some plans



G           D         C          B7      C
when I came home the road washed me to your shore

G               D         C       B7     C
but the key was not where we once left it before

G           D            C             B7        C
so I walked around 'till some clown came out of your door

Am
this is war


-- CHORUS --

-- BREAK --

-- CHORUS --


G       D            B7        C
I was half glass, and you were a sad sack

G        D          C
together we were no good

G           D        B7             C
I'd like to go back, back to our last laugh

G           D         C
I'd like to think we could

</pre>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/hayden-lets-break-up-chords/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PHP: unserialize() Error at offset&#8230; (simple solution)</title>
		<link>http://ryanbosinger.com/blog/2009/php-unserialize-error-at-offset-simple-solution/</link>
		<comments>http://ryanbosinger.com/blog/2009/php-unserialize-error-at-offset-simple-solution/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 18:52:51 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=95</guid>
		<description><![CDATA[Here&#8217;s what I was trying to do:


serialize an array on one page (PHP: serialize($array))
print out the results using echo or print_r
grab the serialized data from another script using file_get_contents
unserialize that array so I could go about my business


but I kept getting this error: 

unserialize() [function.unserialize]: Error at offset 0 of 3457 bytes

I looked around and [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s what I was trying to do:</p>

<ul>
<li><em>serialize</em> an array on one page (PHP: serialize($array))</li>
<li>print out the results using <code>echo</code> or <code>print_r</code></li>
<li>grab the serialized data from another script using <code>file_get_contents</code></li>
<li><em>unserialize</em> that array so I could go about my business</li>
</ul>

<p>but I kept getting this error: </p>

<code>unserialize() [function.unserialize]: Error at offset 0 of 3457 bytes</code>

<p>I looked around and couldn&#8217;t find a simple a solution.  I&#8217;m sure this error can occur in other ways, but I was trying with the simplest of arrays:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">Array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Ryan&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;Bosinger&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>My problem was that my echo statement was <strong>throwing some whitespace in there</strong>.  That&#8217;s all.  This fixed it:</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;search_results&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://localhost/sphider/search.php?query=&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$search_for</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&amp;search=1&amp;start=&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$start</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$result_string</span> <span style="color: #339933;">=</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;search_results&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$result_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">unserialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result_string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>Basically, try <strong>trimming the whitespace</strong> before unserializing.  Hope that helps!</p>

<p><em>Also</em>, I was using Codeigniter but I really don&#8217;t think that has anything to do with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/php-unserialize-error-at-offset-simple-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first online store with Shopify</title>
		<link>http://ryanbosinger.com/blog/2009/my-first-online-store-with-shopify/</link>
		<comments>http://ryanbosinger.com/blog/2009/my-first-online-store-with-shopify/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 19:10:12 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=88</guid>
		<description><![CDATA[


I recently just wrapped up a project setting up an online store for a client.  I knew that building a custom e-commerce solution (or even tinkering with an open-source one) would be far too much work and require way too much maintenance.   For this project, an established online service was definitely the [...]]]></description>
			<content:encoded><![CDATA[<a href="http://ryanbosinger.com/blog/wp-content/uploads/2009/10/ScreenHunter_01-Oct.-24-14.39.gif"><img src="http://ryanbosinger.com/blog/wp-content/uploads/2009/10/ScreenHunter_01-Oct.-24-14.39-300x217.gif" alt="IandM Electric screenshot" title="IandM Electric screenshot" width="300" height="217" class="aligncenter size-medium wp-image-89" /></a>

<p>
I recently just wrapped up a project setting up an online store for a client.  I knew that building a custom e-commerce solution (or even tinkering with an open-source one) would be far too much work and require way too much maintenance.   For this project, an established online service was definitely the way to go.  After doing some poking around, I decided on <a href="http://www.shopify.com" target="_blank">Shopify</a>.  
</p>
<p>
Shopify &#8211; which I believe is built on Ruby on Rails &#8211; seemed to have a nice, clean, modern appeal to it.  Pricing seemed inline with other popular solutions.  It also seemed there were virtually no limits on the amount of design customization that could be done.  This turned out to be true and we&#8217;ve been very pleased with Shopify.  They&#8217;re <em>Vision</em> app (which basically sets up a quick temporary rails server) allows you to edit your theme locally and that&#8217;s just awesome.  The HTML templates start off nice and clean and semantic.  Their custom templating engine called <a href="http://wiki.shopify.com/UsingLiquid" target="_blank">Liquid</a> works nicely and let&#8217;s you easily get what you need done.
</p>
<p>
The store is now live at <a href="http://www.iandmelectric.com" target="_blank">www.iandmelectric.com</a>.  I&#038;M sells solar/wind energy products as well as automotive and industrial products (batteries, starters, heaters, and more).  
</p>
<p>
I&#038;M has been already receiving many inquiries regarding their <a href="http://www.iandmelectric.com/products/alternative-energy-solarsheat-1500g" target="_blank">SolarSheat 1500g</a>.  It&#8217;s basically a solar heater for you&#8217;re home.  It requires no electricity and uses a small solar panel to power the fan which vents the heat inside your home.  Pretty cool.  Good luck guys!  
</p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/my-first-online-store-with-shopify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bulk download original size images from Flickr!</title>
		<link>http://ryanbosinger.com/blog/2009/bulk-download-original-size-images-from-flickr/</link>
		<comments>http://ryanbosinger.com/blog/2009/bulk-download-original-size-images-from-flickr/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 17:30:41 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=79</guid>
		<description><![CDATA[

Straight to the point:  The app is called FlickrDown


I recently returned from a four month trip in South America.  During that time we would upload pictures to a Flickr Pro account I registered before leaving.  The pro account has a yearly fee but allows you to store and download the original unaltered [...]]]></description>
			<content:encoded><![CDATA[<img src="http://ryanbosinger.com/blog/wp-content/uploads/2009/10/ScreenHunter_01-Oct.-02-13.15.gif" alt="FlickrDown Screenshot" title="FlickrDown Screenshot" width="300" height="301" class="aligncenter size-full wp-image-80" />

<p><strong>Straight to the point: </strong> The app is called <a href="http://greggman.com/pages/flickrdown.htm">FlickrDown</a></p>

<p>
I recently returned from a four month trip in South America.  During that time we would upload pictures to a Flickr Pro account I registered before leaving.  The pro account has a yearly fee but allows you to store and download the original unaltered image size.   This was great because my friends and family could view our trip through my photostream as I went, but at the same time I was constantly keeping a back-up of my photos.  
</p>
<p>
However, when I got home I had wanted to download hundreds of original size photos that we had deleted from our cameras.  I had assumed someone would have made a app to do this in bulk, but I couldn&#8217;t find anything!  I resorted to downloading the pictures manually.
</p>
<p>
Today (after an hour of right-click and save), I decide to look again.  The first thing I find is <a href="http://greggman.com/pages/flickrdown.htm">FlickrDown</a>.  This is exactly what I had wanted&#8230; and it seems to have been released in 2005.  I don&#8217;t know what happened there.
</p>
<p>
It&#8217;s no piece of art.  Just something a .NET developer probably whipped in his spare time.  But it works like a charm.  You can download photos on an individual basis, or select a whole set or collection or by tags, etc.  I&#8217;m currently downloading an entire set of 1280 photos which must be at least 8 or 9 gigs.  I half expected something to crash or be slow, but I&#8217;m almost at 75% complete as I type this.
</p>
<p>
<a href="http://greggman.com/pages/flickrdown.htm">FlickrDown</a> seems to have automatically made the choice to download the original sized images.  I&#8217;m not sure how to set it differently, or what it chooses to do if you have a standard Flickr account with no support for original size.  I&#8217;m just happy it&#8217;s working and saving me a bunch of time and though it deserved a shout out.
</p>
<p><strong>Update:</strong> Looks like you can only download 500 pictures at a time.  Still awesome though.</p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/bulk-download-original-size-images-from-flickr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grab RSS feed with PHP</title>
		<link>http://ryanbosinger.com/blog/2009/grab-rss-feed-with-php/</link>
		<comments>http://ryanbosinger.com/blog/2009/grab-rss-feed-with-php/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 20:18:35 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=74</guid>
		<description><![CDATA[I would like to share a PHP function for writing out parts of an RSS feed to a page.  I used this in the redesign of ryanbosinger.com to show the latest three posts of this blog.

To use it, just call the function where you&#8217;d like it show up like so:


&#60;?php getFeed&#40;&#34;http://ryanbosinger.com/blog/feed&#34;, 3&#41;; ?&#62;




The second [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to share a PHP function for writing out parts of an RSS feed to a page.  I used this in the redesign of <a href="http://www.ryanbosinger.com">ryanbosinger.com</a> to show the latest three posts of this blog.</p>

<p>To use it, just call the function where you&#8217;d like it show up like so:</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> getFeed<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://ryanbosinger.com/blog/feed&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</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 second parameter is the amount of posts to show.  It will write out as an unordered list.  You can choose to write out different parts of the feed by changing:  $x->channel->item[$i]->[name-of-feed-tag]</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: #000000; font-weight: bold;">function</span> getFeed<span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$posts_to_show</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	try 
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleXmlElement<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$posts_to_show</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;li&gt;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$x</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> title=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$x</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> target=<span style="color: #000099; font-weight: bold;">\&quot;</span>_blank<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$x</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span> 
	catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> 
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;p&gt;The blog feed doesn't seem to be available at the moment...&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>


]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/grab-rss-feed-with-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>That damn clearFix&#8230;</title>
		<link>http://ryanbosinger.com/blog/2009/that-damn-clearfix/</link>
		<comments>http://ryanbosinger.com/blog/2009/that-damn-clearfix/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 20:52:42 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/?p=68</guid>
		<description><![CDATA[I&#8217;ve used this solution to clear float containers in CSS:


/* float clearing for IE6 */
* html .clearfix&#123;
  height: 1%;
  overflow: visible;
&#125;
&#160;
/* float clearing for IE7 */
*+html .clearfix&#123;
  min-height: 1%;
&#125;
&#160;
/* float clearing for everyone else */
.clearfix:after&#123;
  clear: both;
  content: &#34;.&#34;;
  display: block;
  height: 0;
  visibility: hidden;
  font-size: [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve used this solution to clear float containers in CSS:</p>


<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* float clearing for IE6 */</span>
<span style="color: #00AA00;">*</span> html .clearfix<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">1</span>%</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">visible</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* float clearing for IE7 */</span>
<span style="color: #00AA00;">*+</span>html .clearfix<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">1</span>%</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* float clearing for everyone else */</span>
<span style="color: #6666ff;">.clearfix</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;.&quot;</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">visibility</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>




<p>But it seems you can just do this as well:</p>


<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#container-to-fix</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre></div></div>




<p>Now I&#8217;ve read a bit about how this isn&#8217;t always the most ideal solution, but simply setting overflow to &#8220;hidden&#8221; has definitely been working out for me lately&#8230;</p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2009/that-damn-clearfix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
