Since you need to start a cron job if you want to use subscriptions, I had to modify "subscriptions.pl" a bit, as my ISP does not allow shell cronjobs for standard server packages. What I did is I modified the subscriptions.pl - I commented out every line but one line
#if ($ENV{REQUEST_METHOD}) {
# print "Content-type: text/html\n\n";
# print "This script can only be run from shell/command prompt.";
#}
#else {
# GetOptions(
# 'help' => \$opt{help},
# 'send' => \$opt{send},
# 'debug' => \$opt{debug},
# 'file-debug=s' => \$opt{debug_file}
# );
# if ($opt{send}) {
GForum::Subscribe::send_all(@opt{'debug', 'debug_file'});
# }
# else {
# usage();
# }
#}
Now the script can be executed by html server and be included into a standard html page via SSI. Since my ISP allows a cron job for HTML pages, it just works as it should.
Just in case, anybody needs such a solution..
Since the script itself is in a .htaccess protected area, it cannot be executed by public..
Code:
my %opt; #if ($ENV{REQUEST_METHOD}) {
# print "Content-type: text/html\n\n";
# print "This script can only be run from shell/command prompt.";
#}
#else {
# GetOptions(
# 'help' => \$opt{help},
# 'send' => \$opt{send},
# 'debug' => \$opt{debug},
# 'file-debug=s' => \$opt{debug_file}
# );
# if ($opt{send}) {
GForum::Subscribe::send_all(@opt{'debug', 'debug_file'});
# }
# else {
# usage();
# }
#}
Now the script can be executed by html server and be included into a standard html page via SSI. Since my ISP allows a cron job for HTML pages, it just works as it should.
Just in case, anybody needs such a solution..
Since the script itself is in a .htaccess protected area, it cannot be executed by public..