#!/usr/bin/perl
use strict;
use warnings;
use HTTP::Lite;
open STDERR, ">>/dev/null";
my $url ;
my $req ;
$url = shift @ARGV;
my $http = new HTTP::Lite;
if ( $req = $http->request("${url}") ) {
#print "Step 1 OK \n";
} else {
print "Impossible de charger la page\n";
exit 0;
}
if ( $req ne "200" ) {
print "Code retour de la page: $req\n";
exit 2;
}
my $body = $http->body();
my $dsi_difftime;
if ( $body =~ /<dsi_difftime>(.*)<\/dsi_difftime>/) {
$dsi_difftime = $1;
}