alexbm8_P6_server

code format="perl"
 * 1) !/usr/bin/perl

use CGI qw(:standard); use XML::RSS; use LWP::Simple qw(get);

my $numero_elementos = param('num_elementos'); my $url = param('url'); my $rdf = get($url); my $rss = new XML::RSS; $rss->parse($rdf); my $rss_salida = new XML::RSS; $rss_salida->channel( title => 'Resumen feed',             link => $url,              description => 'Resumiendo el feed' ); print header( -type => 'application/xhtml+xml' );
 * 1) Baja fichero

for (my $i = 0; $i < $numero_elementos;$i ++ ) { $rss_salida->add_item( title => $rss->{'items'}[$i]->{'title'},            link => $rss->{'items'}[$i]->{'link'},             description => $rss->{'items'}[$i]->{'description'}); } print $rss_salida->as_string;

code