<?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 - Yahoo Pipes&amp;#039; Web Service Module and PHP - Comments</title>
 <link>http://labs.echoditto.com/pipes-and-php</link>
 <description>Comments for &quot;Yahoo Pipes&#039; Web Service Module and PHP&quot;</description>
 <language>en</language>
<item>
 <title>ohh superr superr i find</title>
 <link>http://labs.echoditto.com/pipes-and-php#comment-3971</link>
 <description>&lt;p&gt;ohh superr superr i find nowwww. Thank you my friend good working..&lt;/p&gt;
</description>
 <pubDate>Sun, 15 Jun 2008 16:47:09 -0700</pubDate>
 <dc:creator>video seyret</dc:creator>
 <guid isPermaLink="false">comment 3971 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>himm i am now test it..</title>
 <link>http://labs.echoditto.com/pipes-and-php#comment-3940</link>
 <description>&lt;p&gt;himm i am now test it..&lt;/p&gt;
</description>
 <pubDate>Sat, 26 Apr 2008 15:15:03 -0700</pubDate>
 <dc:creator>hersey</dc:creator>
 <guid isPermaLink="false">comment 3940 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Residences can be classified</title>
 <link>http://labs.echoditto.com/pipes-and-php#comment-3892</link>
 <description>&lt;p&gt;Residences can be classified by if and how they are connected to neighboring residences and land. Different types of housing tenure can be used for the same physical type&lt;/p&gt;
</description>
 <pubDate>Thu, 06 Mar 2008 08:46:07 -0800</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 3892 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Yahoo Pipes&#039; Web Service Module and PHP</title>
 <link>http://labs.echoditto.com/pipes-and-php</link>
 <description>&lt;p&gt;I&#039;m a little shocked to see that we haven&#039;t talked about &lt;a href=&quot;http://pipes.yahoo.com&quot;&gt;Yahoo Pipes&lt;/a&gt; around these parts.  It&#039;s an awfully cool service, and one that we use around the office for various non-mission-critical functions &amp;mdash; getting larger photos from a Flickr stream for display on the monitors in the lobby, for one thing.&lt;/p&gt;

&lt;p&gt;For those unaware, Pipes lets you mix, translate, annotate and otherwise alchemically modify feeds of all sorts.  Want to add a (possibly) relevant photo to each entry on your blog?  Or only get posts from a particular author on a group blog?  Or get filtered Craiglist real estate listings translated into German and sent to your mobile phone?  Pipes can do all of this, and does so via a terminally-slick GUI.&lt;/p&gt;

&lt;p&gt;But recently &lt;a href=&quot;http://bayes.wordpress.com/2007/08/16/json-and-the-piping-bots/&quot;&gt;a friend&lt;/a&gt; tipped me off to Pipes&#039; most significant capability.  The folks at Yahoo! have unveiled the Holy Grail of feed-manipulation components: a &lt;a href=&quot;http://blog.pipes.yahoo.com/2007/08/13/power-your-own-module/&quot;&gt;JSON-powered interface to external web services&lt;/a&gt;.  If Pipes doesn&#039;t offer some functionality you need, you can now write a web service that does and connect it to the system.&lt;/p&gt;

&lt;p&gt;Their &lt;a href=&quot;http://blog.pipes.yahoo.com/examples/example.03.html&quot;&gt;example code&lt;/a&gt; is in Java, but it didn&#039;t take much effort for me to get one working in PHP.  Just install the &lt;a href=&quot;http://pecl.php.net/package/json&quot;&gt;JSON PECL Package&lt;/a&gt; and use code like the following:&lt;/p&gt;

&lt;blockquote&gt;&lt;pre&gt;&amp;lt;?php
dl(&#039;json.so&#039;);

$json = json_decode($_POST[&#039;data&#039;]);
for($i=0;$i&amp;lt;sizeof($json-&amp;gt;items);$i++)
        $json-&amp;gt;items[$i]-&amp;gt;description = strtoupper($json-&amp;gt;items[$i]-&amp;gt;description);

header(&#039;Content-Type: application/json&#039;);
print json_encode($json);
?&amp;gt;&lt;/pre&gt;&lt;/blockquote&gt;

&lt;p&gt;This not-quite-incredibly-useful web service simply takes a JSON POST from Pipes and makes the entry bodies all capital letters.  You can see some sample output (using this blog&#039;s feed) &lt;a href=&quot;http://pipes.yahoo.com/pipes/pipe.run?_id=3tGasrxO3BGWVJHjjknRlg&amp;_render=rss&quot;&gt;here&lt;/a&gt;.  You&#039;ll also want to have a look at &lt;a href=&quot;http://pipes.yahoo.com/pipes/pipe.edit?_id=3tGasrxO3BGWVJHjjknRlg&quot;&gt;the pipe itself&lt;/a&gt; &amp;mdash; the &quot;path to item list&quot; parameter to the Web Service object isn&#039;t totally intuitive, but is essential to getting the module to work properly.&lt;/p&gt;

&lt;p&gt;Like I said, this isn&#039;t a very useful Pipe. But hopefully the general recipe will come in handy for someone for whom Yahoo&#039;s Java example looks like gibberish.  And perhaps we&#039;ll be able to hook Pipes up to &lt;a href=&quot;http://labs.echoditto.com/fulltextrss&quot;&gt;something more useful&lt;/a&gt; soon...&lt;/p&gt;</description>
 <comments>http://labs.echoditto.com/pipes-and-php#comments</comments>
 <category domain="http://labs.echoditto.com/taxonomy/term/84">json</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/60">php</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/17">rss</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/19">syndication</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/83">webservices</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/81">yahoo</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/82">yahoopipes</category>
 <pubDate>Sun, 19 Aug 2007 21:12:07 -0700</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">40 at http://labs.echoditto.com</guid>
</item>
</channel>
</rss>
