New Yahoo! Pipes PHP serialized output renderer

Until now JSON output has been the only way to obtain all the data flowing through a Pipe. Starting today we’ve added a second way of getting all the data – serialized PHP Pipe output.

To get this, go to your Pipe -> More options -> Get as PHP. Right click the “Get as PHP” link to copy link location (or copy shortcut if using IE).

phpdropdown.png

After obtaining the link location, you can do something as simple as this to get Pipe output data as an array into your PHP script.

// Pipes Request
$req = 'http://pipes.yahoo.com/pipes/pipe.run?_id=ZKJobpaj3BGZOew9G8evXg&_render=php';
// Make the request
$phpserialized = file_get_contents($req);
// Parse the serialized response
$phparray = unserialize($phpserialized);

To view the array in your web browser, use this piece of PHP code to help visualize the array.

print_r($phparray);

print_r.png

To view a code sample on how to do a request go here. To read more about serialized PHP at Yahoo!, go here.

It’s then up to you on how you want to display or use the Pipe data. The possibilities are endless.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>