Vergleich inc/class_feedparser.php - 1.8.25 - 1.8.36

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 39Zeile 39
	 */
function parse_feed($feed)
{

	 */
function parse_feed($feed)
{

		// Include the XML parser
require_once MYBB_ROOT."inc/class_xml.php";


 
		// Load the feed we want to parse
$contents = fetch_remote_file($feed);


		// Load the feed we want to parse
$contents = fetch_remote_file($feed);


Zeile 53Zeile 50
			$contents = substr($contents, strpos($contents, "<"));
}
if(strrpos($contents, ">")+1 !== strlen($contents))

			$contents = substr($contents, strpos($contents, "<"));
}
if(strrpos($contents, ">")+1 !== strlen($contents))

		{

		{

			$contents = substr($contents, 0, strrpos($contents, ">")+1);

			$contents = substr($contents, 0, strrpos($contents, ">")+1);

		}


		}


		// Could not load the feed, return an error
if(!$contents)
{

		// Could not load the feed, return an error
if(!$contents)
{

Zeile 65Zeile 62
		}

// Parse the feed and get the tree

		}

// Parse the feed and get the tree

		$parser = new XMLParser($contents);
$tree = $parser->get_tree();

		$parser = create_xml_parser($contents);
$tree = $parser->get_tree();


// If the feed is invalid, throw back an error
if($tree == false)


// If the feed is invalid, throw back an error
if($tree == false)

Zeile 140Zeile 137
				$item['title'] = $feed_item['title']['value'];
}


				$item['title'] = $feed_item['title']['value'];
}


			if(array_key_exists("description", $feed_item))

			if(isset($feed_item['description']['value']))

			{
$item['description'] = $feed_item['description']['value'];

			{
$item['description'] = $feed_item['description']['value'];

 
			}
else
{
$item['description'] = '';

			}

if(array_key_exists("link", $feed_item))

			}

if(array_key_exists("link", $feed_item))