I'm trying to get RSS feed with tag , but the always gets reduced to a small part of the text continued by "...". I already checked this topic but I got no results as I expected. This is the feed I'm trying to parse:
https://bus237d201smartphones.wordpress.com/feed/
And this is my code:
function resolveFile($file_or_url) {
if (!preg_match('|^https?:|', $file_or_url))
$feed_uri = $_SERVER['DOCUMENT_ROOT'] .'/shared/xml/'. $file_or_url;
else
$feed_uri = $file_or_url;
return $feed_uri;
}
$file_or_url='https://bus237d201smartphones.wordpress.com/feed/';
$file_or_url = resolveFile($file_or_url);
if (!($x = simplexml_load_file($file_or_url)))
return;
foreach ($x->channel->item as $item)
{
$content = $item->children("content", true);;
echo("<br>");
echo("content <br>");
print_r($content);
$e_encoded = $content->encoded;
echo("<br>");
echo("encoded <br>");
print_r($e_encoded);
}
This is browser output:
content
SimpleXMLElement Object ( [encoded] => SimpleXMLElement Object ( ) )
encoded
SimpleXMLElement Object ( [0] => SimpleXMLElement Object ( ) )
Google made the Android operating system for all kinds
of handheld devices (Smartphones and PC Table...
What is wrong with it?