MagpieRSSHybrid parser, and object, takes RSS as a string and returns a simple object.
see: rss_fetch.inc for a simpler interface with integrated caching support
Located in /net/nemein/rss/magpierss/rss_parse.inc (line 35)
MagpieRSS
MagpieRSS
(string $source, [string $output_encoding = 'ISO-8859-1'], [string $input_encoding = null], [bool $detect_encoding = true])
mixed
$channel
= array() (line 40)
mixed
$current_field
= '' (line 64)
mixed
$current_item
= array() (line 38)
mixed
$current_namespace
= false (line 65)
mixed
$encoding
= '' (line 45)
mixed
$ERROR
= "" (line 49)
mixed
$feed_type
(line 43)
mixed
$feed_version
(line 44)
mixed
$image
= array() (line 42)
mixed
$inchannel
= false (line 59)
mixed
$incontent
= false (line 61)
mixed
$inimage
= false (line 63)
mixed
$initem
= false (line 60)
mixed
$intextinput
= false (line 62)
mixed
$items
= array() (line 39)
mixed
$parser
(line 36)
mixed
$stack
= array() (line 58)
mixed
$textinput
= array() (line 41)
mixed
$WARNING
= "" (line 50)
mixed
$_CONTENT_CONSTRUCTS
= array('content', 'summary', 'info', 'title', 'tagline', 'copyright') (line 54)
mixed
$_KNOWN_ENCODINGS
= array('UTF-8', 'US-ASCII', 'ISO-8859-1') (line 55)
mixed
$_source_encoding
= '' (line 47)
Set up XML parser, parse source, and return populated RSS object..
string containing the RSS to be parsed
NOTE: Probably a good idea to leave the encoding options alone unless you know what you're doing as PHP's character set support is a little weird.
NOTE: A lot of this is unnecessary but harmless with PHP5
output the parsed RSS in this character set defaults to ISO-8859-1 as this is PHP's default.
NOTE: might be changed to UTF-8 in future versions.
return XML parser, and possibly re-encoded source
Instaniate an XML parser under PHP4
Unfortunately PHP4's support for character encodings and especially XML and character encodings sucks. As long as the documents you parse only contain characters from the ISO-8859-1 character set (a superset of ASCII, and a subset of UTF-8) you're fine. However once you step out of that comfy little world things get mad, bad, and dangerous to know.
The following code is based on SJM's work with FoF
Instantiate an XML parser under PHP5
PHP5 will do a fine job of detecting input encoding if passed an empty string as the encoding.
All hail libxml2!
Documentation generated on Mon, 21 Nov 2005 18:21:41 +0100 by phpDocumentor 1.3.0RC3