The language element is optional in the RSS specification, if it doesn't have one the author didn't supply it. The likelihood is it's en
when get_language()
returns null
, which is probably about the safest assumption you can make.
SimplePie RSS - get_language in NULL
Domanda
Hi i use SimplePie in this way:
$feed = new SimplePie();
$feed->set_feed_url( array("feed.xml", "feed2.xml") );
$feed->enable_cache(false);
$feed->init();
$feed->handle_content_type();
var_dump($feed->get_language());
foreach ($feed->get_items() as $item):
get_language() return NULL .. I miss something?
Is possible get the language of each Item? Thanks.
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow