sam_h
09-25-2008, 02:15 AM
Hi all,
I have created a Y!Pipe for my site. I want to export the pipe as php and then display the content of the feed in my latest news section.
I am a beginner with PHP and am learning as I go, but I have managed to call the pipe and get it to display as follows: http://onyahead.com/news_php.php
obviously there is no styling whatsoever but I was quite happy to simply get the content displayed.
To call the pipe I used the following code:
<?php
error_reporting(E_ALL);
// output=php means that the request will return serialized PHP
$request = 'http://pipes.yahoo.com/pipes/pipe.run?_id=wO7isSpn3RGPcxwo_w6H4A&_render=php';
$response = file_get_contents($request);
if ($response === false) {
die('Request failed');
}
$phpobj = unserialize($response);
echo '<pre>';
print_r($phpobj);
echo '</pre>';
?>
I am looking for help to now get this code to display the title of each post as a link and a brief description (currently it is displaying the whole article), and obviously get it to look half decent and actually fit on my page!!
I am trying with this PHP malarky, but I could do with a shove in the right direction here!
Thanks in advance
I have created a Y!Pipe for my site. I want to export the pipe as php and then display the content of the feed in my latest news section.
I am a beginner with PHP and am learning as I go, but I have managed to call the pipe and get it to display as follows: http://onyahead.com/news_php.php
obviously there is no styling whatsoever but I was quite happy to simply get the content displayed.
To call the pipe I used the following code:
<?php
error_reporting(E_ALL);
// output=php means that the request will return serialized PHP
$request = 'http://pipes.yahoo.com/pipes/pipe.run?_id=wO7isSpn3RGPcxwo_w6H4A&_render=php';
$response = file_get_contents($request);
if ($response === false) {
die('Request failed');
}
$phpobj = unserialize($response);
echo '<pre>';
print_r($phpobj);
echo '</pre>';
?>
I am looking for help to now get this code to display the title of each post as a link and a brief description (currently it is displaying the whole article), and obviously get it to look half decent and actually fit on my page!!
I am trying with this PHP malarky, but I could do with a shove in the right direction here!
Thanks in advance