<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://labs.echoditto.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>EchoDitto Labs - Make A Mobile Site From An RSS Feed - Comments</title>
 <link>http://labs.echoditto.com/rss2mobile</link>
 <description>Comments for &quot;Make A Mobile Site From An RSS Feed&quot;</description>
 <language>en</language>
<item>
 <title>Here&#039;s a nice set of</title>
 <link>http://labs.echoditto.com/rss2mobile#comment-3982</link>
 <description>&lt;p&gt;Here&#039;s a nice set of functions to detect mobile phones, as well as a separate &amp;amp; simple function to detect the iPhone specifically with php.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.andymoore.info/php-to-detect-mobile-phones/&quot; title=&quot;http://www.andymoore.info/php-to-detect-mobile-phones/&quot;&gt;http://www.andymoore.info/php-to-detect-mobile-phones/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
</description>
 <pubDate>Sat, 28 Jun 2008 11:46:37 -0700</pubDate>
 <dc:creator>na3s</dc:creator>
 <guid isPermaLink="false">comment 3982 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>The URL is grabbed from a</title>
 <link>http://labs.echoditto.com/rss2mobile#comment-3888</link>
 <description>&lt;p&gt;The URL is grabbed from a GET parameter in the following line:&lt;/p&gt;
&lt;p&gt;$rss_url = urldecode($_GET[&#039;rss&#039;]);&lt;/p&gt;
&lt;p&gt;You could override that easily if you want to hardcode the URL.&lt;/p&gt;
</description>
 <pubDate>Wed, 27 Feb 2008 10:41:11 -0800</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">comment 3888 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Where do you put the RSS url</title>
 <link>http://labs.echoditto.com/rss2mobile#comment-3862</link>
 <description>&lt;p&gt;Where do you put the RSS url within the acript at?&lt;/p&gt;
</description>
 <pubDate>Tue, 25 Dec 2007 18:29:41 -0800</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 3862 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Make A Mobile Site From An RSS Feed</title>
 <link>http://labs.echoditto.com/rss2mobile</link>
 <description>&lt;p&gt;In my spare time I contribute to &lt;a href=&quot;http://www.dcist.com&quot;&gt;DCist&lt;/a&gt;, the Washington edition of the Gothamist blog network.  Yesterday I got an email from a reader asking why our mobile version was so out-of-date &amp;mdash; I hadn&#039;t realized it, but she was right: the mobile edition had fallen through the cracks as the network&#039;s configuration changed &amp;amp; grew.&lt;/p&gt;

&lt;p&gt;So I took a stab at writing a general solution to the problem that could be used across the -ist sites, and was pleasantly surprised at how easy it turned out to be.  You might find it useful, too.&lt;/p&gt;

&lt;p&gt;The solution takes a full-text RSS feed and turns it into some parsimonious HTML that should be suitable for most mobiles.  And it ought to work for any valid RSS feed.  You can check out DCist&#039;s mobile feed &lt;a href=&quot;http://dcist.com/m&quot;&gt;here&lt;/a&gt;.  Alternately, you can check out a mobile version of this blog &lt;a href=&quot;http://labs.echoditto.com/projects/rss2mobile/?rss=http://labs.echoditto.com/blog/feed&quot;&gt;here&lt;/a&gt;.  If you&#039;d like to try it on another blog, just enter its RSS feed in the field below and hit submit.&lt;/p&gt;

&lt;div style=&quot;width=&quot;400px;display:block;margin: 0 auto&quot;&gt;
&lt;form action=&quot;http://labs.echoditto.com/projects/rss2mobile/&quot; method=&quot;get&quot;&gt;
&lt;div style=&quot;float:left; margin-right: 5px;&quot;&gt;
&lt;label for=&quot;rss&quot;/&gt;&lt;small&gt;URL of full-text RSS feed&lt;/small&gt;&lt;/label&gt;&lt;br/&gt;
&lt;input type=&quot;text&quot; name=&quot;rss&quot;/&gt;&lt;/div&gt;&lt;div style=&quot;float:left&quot;&gt;&lt;label&gt;&lt;small&gt;&amp;nbsp;&lt;/small&gt;&lt;/label&gt;&lt;br/&gt;&lt;input type=&quot;submit&quot; value=&quot;Go&quot;/&gt;&lt;/div&gt;
&lt;/form&gt;
&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;&lt;/div&gt;

&lt;p&gt;The script itself is pretty short, and is recreated behind the jump.  It&#039;ll require that you install a copy of &lt;a href=&quot;http://magpierss.sourceforge.net/&quot;&gt;Magpie RSS&lt;/a&gt; in an appropriately-named subdirectory.  And if you want to use caching &amp;mdash; and I recommend that you do &amp;mdash; you&#039;ll need to make sure that you have the &lt;a href=&quot;http://pear.php.net/package/Cache/redirected&quot;&gt;PEAR::Cache package&lt;/a&gt; installed.&lt;/p&gt;

&lt;p&gt;You can find the code after the jump, or simply download it &lt;a href=&quot;http://labs.echoditto.com/projects/rss2mobile/rss2mobile.php.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Of course, you&#039;ll need to instruct your mobile users to go to a different URL.  Could that be done automatically instead?  Stay tuned.&lt;/p&gt;

&lt;!--break--&gt;
&lt;blockquote style=&quot;overflow:auto&quot;&gt;&lt;pre&gt;
&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;
You&amp;nbsp;must&amp;nbsp;specify&amp;nbsp;the&amp;nbsp;URL&amp;nbsp;of&amp;nbsp;a&amp;nbsp;valid&amp;nbsp;RSS&amp;nbsp;feed&amp;nbsp;in&amp;nbsp;the&amp;nbsp;&#039;url&#039;&amp;nbsp;parameter&amp;nbsp;of&amp;nbsp;the&amp;nbsp;querystring.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;</description>
 <comments>http://labs.echoditto.com/rss2mobile#comments</comments>
 <pubDate>Thu, 19 Apr 2007 12:35:26 -0700</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">10 at http://labs.echoditto.com</guid>
</item>
</channel>
</rss>
