I am trying to read data from an RSS feed which has 25 items. When I request the RSS file through HTTP it says there are only 20 items.
function test($location)
{
$doc = new DomDocument();
$doc->load($location);
$items = $doc->getElementsByTagName('item');
return $items->length;
}
// Prints 20
echo test('http://www.reddit.com/r/programming/new/.rss?after=t3_');
// Prints 25
echo test('programming.xml');
I've tried RSS feeds from other subreddits as well with the same result.