Hi,
I run this pearl robot from crontab to do this.
Be carefull with Protector Module that may reject your IP if you insist while testing it.
Nicolas.
#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;
#-------------------
my $login="...";
my $passwd="...";
my $connexionUrl="http://.../index.php";
my $eventsUrl="http://.../modules/piCal/index.php?smode=List&op=all";
#-------------------
my $agent = WWW::Mechanize->new();
# Get cookie and connect
$agent->get($connexionUrl);
$agent->form_number(1);
$agent->field('uname', "$login");
$agent->field('pass', "$passwd");
$agent->click();
# Get event list
$agent->get($eventsUrl);
my $page=$agent->content;
$agent->form_name('MainForm');
$agent->tick('dummy', 'on');
# Mark all events into checkbox
my $dummy="";
my $number="";
do {
($dummy, $page) = split(/<input type='checkbox' name='ids\[\]' value=/, $page, 2);
if (defined($page))
{
($dummy, $number) = split(/'/, $page, 3);
$agent->tick('ids[]', "$number");
}
}
while (defined($page));
# Post form
$agent->click('output_ics_confirm');
# Ask for iCalendar (Windows) format
$agent->form_number(1);
$agent->click('do_output');
# Print iCalendar file
print $agent->content;