Vergleich inc/class_feedparser.php - 1.2.0 - 1.2.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1Zeile 1
<?php
/**
* MyBB 1.2

<?php
/**
* MyBB 1.2

 * Copyright © 2006 MyBB Group, All Rights Reserved

 * Copyright � 2006 MyBB Group, All Rights Reserved

 *

 *

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id$

 * $Id: class_feedparser.php 3508 2007-11-23 16:10:16Z Tikitiki $

 */

class FeedParser

 */

class FeedParser

Zeile 44Zeile 44
		require_once MYBB_ROOT."inc/class_xml.php";

// Load the feed we want to parse

		require_once MYBB_ROOT."inc/class_xml.php";

// Load the feed we want to parse

		$contents = @implode("", @file($feed));














		$contents = fetch_remote_file($feed);

// This is to work around some dodgy bug we've detected with certain installations of PHP
// where certain characters would automagically appear between the fetch_remote_file call
// and here which break the feed being imported.
// - It could just be that Chris and Tiki need some hot chocolate.
if(strpos($contents, "<") !== 0)
{
$contents = substr($contents, strpos($contents, "<"));
}
if(strrpos($contents, ">")+1 !== strlen($contents))
{
$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 165Zeile 178
			// Otherwise, attempt to use the author if we have it
else if(array_key_exists("author", $feed_item))
{

			// Otherwise, attempt to use the author if we have it
else if(array_key_exists("author", $feed_item))
{

				$item['author'] = $fed_item['author']['value'];

				$item['author'] = $feed_item['author']['value'];

			}

// Assign the item to our list of items

			}

// Assign the item to our list of items