Я полагаю, rss_php эта вещь: http://rssphp.net/download/
Попробуйте это:
<?php
require_once 'rss_php.php';
$rss = new rss_php;
$rss->load('http://rss.thepiratebay.se/205');
print_r($rss->getRSS());
?>
Проверьте источник веб-страницы. Это данные в вашем массиве. Вы можете напрямую использовать его без использования json. Поскольку в массивах есть массивы, вы не можете легко просмотреть результаты. Сделайте что-то вроде:
$arr = $rss->getRSS();
echo $arr['rss']['channel']['title'];
Edit: Если вы хотите Foreach через все результаты, я предлагаю что-то вроде этого:
<?php
require_once 'rss_php.php';
$rss = new rss_php;
$rss->load('http://rss.thepiratebay.se/205');
$arr = $rss->getRSS();
//foreach over all the stuff in the channel
foreach ($arr['rss']['channel'] as $key=>$val)
{
//In the array are keys like "title" and "comments", but we only want to iterate over the "item:1" (or some other number than 1), so only echo if the first 4 letters of the key are "item"
if (substr($key,0,4) == "item")
{
//echo the title, but you can also echo other things in that array. Check the code with the print_r to easily see what's in the feed
echo $val['title'].'<br />';
}
}
?>
Что такое 'rss_php.php'? – JavaCake
'$ some_var = json_decode (json_encode ($ some_other_var));'? Hmmmmmm .... – jeroen
Что именно возвращает '$ rss-> getRSS()' return? – jeroen