I'm a little shocked to see that we haven't talked about Yahoo Pipes around these parts. It's an awfully cool service, and one that we use around the office for various non-mission-critical functions — getting larger photos from a Flickr stream for display on the monitors in the lobby, for one thing.
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.
But recently a friend tipped me off to Pipes' most significant capability. The folks at Yahoo! have unveiled the Holy Grail of feed-manipulation components: a JSON-powered interface to external web services. If Pipes doesn't offer some functionality you need, you can now write a web service that does and connect it to the system.
Their example code is in Java, but it didn't take much effort for me to get one working in PHP. Just install the JSON PECL Package and use code like the following:
<?php
dl('json.so');
$json = json_decode($_POST['data']);
for($i=0;$i<sizeof($json->items);$i++)
$json->items[$i]->description = strtoupper($json->items[$i]->description);
header('Content-Type: application/json');
print json_encode($json);
?>
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's feed) here. You'll also want to have a look at the pipe itself — the "path to item list" parameter to the Web Service object isn't totally intuitive, but is essential to getting the module to work properly.
Like I said, this isn't a very useful Pipe. But hopefully the general recipe will come in handy for someone for whom Yahoo's Java example looks like gibberish. And perhaps we'll be able to hook Pipes up to something more useful soon...
Residences can be classified
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
himm i am now test it..
himm i am now test it..
ohh superr superr i find
ohh superr superr i find nowwww. Thank you my friend good working..
Post new comment