Actualités: Madagascar
#!/usr/bin/perl
# This script is meant for including news app content in
# non news app pages.
#
# Example:
#
use warnings;
use LWP::Simple qw(get);
use CGI::Carp qw(fatalsToBrowser);
my (@userdata,$value,$input);
@userdata = split (/&/,$ENV{"QUERY_STRING"});
foreach (@userdata) {
($field,$value) = /(.*)=(.*)/;
$value=~ tr/+/ /;
$value=~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
$input{$field} .= "\n" if ($input{$field});
$input{$field} .= $value;
}
print "Content-type: text/html\n\n";
my $subdomain = $input{"subdomain"};
my $limit = $input{"limit"};
my $tag = $input{"tag"};
my $template = $input{"alt_template"};
my $url = "http://" . $subdomain . ".mongabay.com/news-index/" . $tag . "1.html?alt_template=" . $template . "&limit=" . $limit;
my $page = get $url;
if ($page) {
print $page;
} else {
print "Invalid parameters";
}
|
|
WildMadagascar
Introduction
Carte
Matériel éducatif
Pour les enfants
La population
Histoire
Flore
Photos
Faune
Conservation
Aires Protégées
La subvention
Forêts tropicales
Mongabay.com
Actualités
Afrique
l’Amazonie
Brésil
La déforestation
Les forêts tropicales
La faune sauvage
Madagascar
Indonésie
REDD
Les forets humides
Pour les enfants
Les poissons tropicaux
Photos
|