Home « Server software «
Documentation: services/rss_codec.php
Class rss_Codec extends Codec - Rss 2.0 encoder and decoder
We are not providing the <author> field anymore because of the risk to expose e-mail addresses to spammers.If the geographical position of the server has been set through the configuration panel for skins, it is included into the feed as well.
This script is a reference file of this system.
Voir aussi:
- RSS 2.0 Specification
- Extending RSS 2.0 With Namespaces
- MagpieRSS: a simple RSS integration tool, from Kellan Elliott-McCrea
- ICBM RSS module
- articles/feed.php
- categories/feed.php
- comments/feed.php
- feeds/feeds.php
- feeds/rss_2.0.php
- sections/feed.php
- services/call.php
- services/codec.php
- services/search.php
- users/feed.php
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
- Dobliu
Reste à faire:
- decode using preg_match(), to fix parsing overflow?
decode() - Parse some news
function decode($data)
- $data - array the received $HTTP_RAW_POST_DATA
- returns array a status code (TRUE is ok) and the parsing result
parse_cdata()
function parse_cdata($parser, $text)
- $parser -
- $text -
parse_end_element()
function parse_end_element($parser, $element)
- $parser -
- $element -
parse_start_element()
function parse_start_element($parser, $element, $attributes)
- $parser -
- $element -
- $attributes -
clean() - Suppress tags and codes from a string
function clean($label, $allowed='')
- $label - string a label to check
- $allowed='' - allowed html tags
- returns a clean string
encode() - Encode some PHP value into XML
function encode(&$values)
- &$values - mixed the parameter to encode
- returns some XML
- $values['channel']['title'] is a string
- $values['channel']['link'] is a string
- $values['channel']['description'] is a string
- $values['channel']['image'] is a string to a channel image, if any
- $values['items'] is an array of $url => array($time, $title, $author, $section, $image, $introduction, $description, $comments, $trackback, $comment_post, $comment_rss)
export_request() - Build a request according to the RSS 2.0 specification
function export_request($service, $parameters = NULL)
- $service - string name of the remote service
- $parameters = NULL - mixed transmitted parameters, if any
- returns an array of which the first value indicates call success or failure
Voir aussi:
export_response() - Build a response according to the RSS 2.0 specification
function export_response($values=NULL, $service=NULL)
- $values=NULL - mixed transmitted values, if any
- $service=NULL - string name of the remote service, if any
- returns an array of which the first value indicates call success or failure
Voir aussi:
import_request() - Parse a XML submitted packet according to the RSS 2.0 specification
function import_request($data)
- $data - array the received $HTTP_RAW_POST_DATA
- returns array the service called and the related input parameters
import_response() - Decode a XML response
function import_response($data, $headers=NULL, $parameters=NULL)
- $data - string the received HTTP body
- $headers=NULL - string the received HTTP headers
- $parameters=NULL - mixed the submitted parameters
- returns an array of which the first value indicates call success or failure