Skip to main content Help Control Panel

Aubagne HipHop

Tout le Hip Hop d'Aubagne et des alentours

Home «   Server software «  

Documentation: services/slashdot_codec.php

Class slashdot_Codec extends Codec - Encoder and decoder for slashdot messages

Messages

At the moment, this script gives following information for each resource:

You will find below an excerpt of a real feed from slashdot:
<?xml version="1.0"?><backslash
xmlns:backslash="http://slashdot.org/backslash.dtd">

<story>
<title>Recording Industry Extinction Predicted RSN</title>
<url>http://slashdot.org/article.pl?sid=03/01/23/1236242</url>
<time>2003-01-23 17:00:05</time>
<author>michael</author>
<department>imminent-death-predictions-getting-boring</department>
<category>141</category>
<comments>107</comments>
<section>articles</section>
<image>categorymusic.gif</image>
</story>

...

<story>
<title>Using Redundancies to Find Errors</title>
<url>http://slashdot.org/article.pl?sid=03/01/23/0221242</url>
<time>2003-01-23 04:20:58</time>
<author>timothy</author>
<department>the-error-is-right-around-here</department>
<category>156</category>
<comments>270</comments>
<section>developers</section>
<image>categoryprogramming.gif</image>
</story>

</backslash>


This script is a reference file of this system.

Voir aussi:

Licence: GNU Lesser General Public License

Auteurs:

export() - Build a XML request according to the slashdot API

function export($service, $parameters)

Called by export_request() and export_response() to actually build a list of resources.

Parameters is an array of $url => $attributes describing articles. Attributes are split according to the following syntax:
list($time$title$author$section$image$description) = $attributes;


export_request() - Build a XML request according to the slashdot API

function export_request($service, $parameters)

Example:
$result $codec->export_request($service$parameters);


Parameters is an array of $url => $attributes describing articles. Attributes are split according to the following syntax:
list($time$title$author$section$image$description) = $attributes;


Voir aussi:

export_response() - Build a XML response according to the slashdot API

function export_response($values=NULL, $service=NULL)

Example:
$result $codec->export_response($values);


Parameters is an array of $url => $attributes describing articles. Attributes are split according to the following syntax:
list($time$title$author$section$image$description) = $attributes;


Voir aussi:

import_request() - Parse a XML request

function import_request($data)

import_response() - Decode a XML response

function import_response($data, $headers=NULL, $parameters=NULL)

parse_tag_open()

function parse_tag_open($parser, $tag, $attributes)

parse_cdata()

function parse_cdata($parser, $cdata)

parse_tag_close()

function parse_tag_close($parser, $tag)

Tools
Browse the source of this script
Server software