Hello,
I'm trying to set up SimplePie to query a PHP-generated feed with a few
arguments, but all I'm getting is the feed without the arguments, i.e. I'm
trying to grab http://www.gamespot.com/rss/game_updates.php?platform=5&type=3
but all I get is http://www.gamespot.com/rss/game_updates.php
I suppose there is something going on with the URL sanitizer, but I can't guess
what. Before that I tried MagpieRSS, which had no problem with the same feed
(so I don't think it comes from an issue on my Apache or PHP configuration).
The code I use (a bit dirty since it's just for testing):
require_once('sp/simplepie.php');
$feed = new SimplePie();
$feed->set_feed_url("http://www.gamespot.com/rss/game_updates.php?platform=5&type=3");
$feed->set_cache_location('sp/cache');
$feed->init();
echo "Channel Title: " . $feed->get_title() . "<p>";
echo "<ul>";
foreach ($feed->get_items() as $item) {
$href = $item->get_permalink();
$title = $item->get_title();
echo "<li><a href=$href>$title</a></li>";
}
echo "</ul>";
Thanks