[ Index ] |
|
Code source de e107 0.7.8 |
[Code source] [Imprimer] [Statistiques]
Project: MagpieRSS: a simple RSS integration tool File: rss_parse.inc - parse an RSS or Atom feed return as a simple object. Handles RSS 0.9x, RSS 2.0, RSS 1.0, and Atom 0.3
Author: | Kellan Elliott-McCrea <kellan@protest.net> |
License: | GPL |
Version: | 0.7a |
Poids: | 630 lignes (21 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
MagpieRSS:: (17 méthodes):
MagpieRSS()
feed_start_element()
feed_cdata()
feed_end_element()
concat()
append_content()
append()
normalize()
is_rss()
is_atom()
create_parser()
php5_create_parser()
php4_create_parser()
known_encoding()
error()
map_attrs()
parse_w3cdtf()
MagpieRSS($source, $output_encoding = CHARSET, $input_encoding=null, $detect_encoding = true) X-Ref |
Set up XML parser, parse source, and return populated RSS object.. param: string $source string containing the RSS to be parsed param: string $output_encoding output the parsed RSS in this character param: string $input_encoding the character set of the incoming RSS source. param: bool $detect_encoding if false Magpie won't attempt to detect |
feed_start_element($p, $element, &$attrs) X-Ref |
Pas de description |
feed_cdata($p, $text) X-Ref |
Pas de description |
feed_end_element($p, $el) X-Ref |
Pas de description |
concat(&$str1, $str2 = "") X-Ref |
Pas de description |
append_content($text) X-Ref |
Pas de description |
append($el, $text) X-Ref |
Pas de description |
normalize() X-Ref |
Pas de description |
is_rss() X-Ref |
Pas de description |
is_atom() X-Ref |
Pas de description |
create_parser($source, $out_enc, $in_enc, $detect) X-Ref |
return XML parser, and possibly re-encoded source |
php5_create_parser($in_enc, $detect) X-Ref |
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! |
php4_create_parser($source, $in_enc, $detect) X-Ref |
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 |
known_encoding($enc) X-Ref |
Pas de description |
error($errormsg, $lvl=E_USER_WARNING) X-Ref |
Pas de description |
map_attrs($k, $v) X-Ref |
Pas de description |
parse_w3cdtf( $date_str ) X-Ref |
Pas de description |
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |