hmmm...well I tried it and it didn't work :( would you look over the following and see if I might have missed something?
I don't know if this helps, but the address to my admin is
http://associate-trackers.com/cgi-bin/links/admin/admin.cgi
nph-build.cgi....
#!usr/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: nph-build.cgi
# Description: Builds a set of HTML pages from the template directory. This is a
# non parsed header script, and should display the output directly as it may
# take quite a while to perform. It can also be called from the
# command line or via a cron routine. Read the README for more details.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998
Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================
# Required Librariers
# --------------------------------------------------------
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \
require "links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
$build_use_templates ?
require "$db_lib_path/site_html_templates.pl" :
require "$db_lib_path/site_html.pl";
use vars qw(%category %subcategories @links @new_links @cool_links %stats $grand_total $use_html $nph $date $time);
};
if ($@) {
print "HTTP/1.0 200 OK\n";
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}
# ========================================================
eval { &main; }; # Trap any fatal errors so the program hopefully
if ($@) { &cgierr("fatal error: $@"); } # never produces that nasty 500 server error page.
exit; # There are only two exit calls in the script, here and in in &cgierr.
sub main {
# --------------------------------------------------------
#
$|++;
$use_html = 1;
$ENV{'REQUEST_METHOD'} and $use_html++;
$use_html and (%in = &parse_form);
# Either build the whole directory, parts of it, or just the new/popular section.
if ($use_html) {
if ($in{'staggered'}) { &build_staggered; }
else { &build_all; }
}
else { &build_all; }
}
sub build_staggered {
# --------------------------------------------------------
# Builds the directory in steps.
#
my %in = &parse_form;
# $nph ;
&html_print_headers() if ($use_html);
my %steps = ( 1 => 'Updating New and Popular Records and rebuilding URL database',
2 => 'Rebuilding Category Pages',
3 => 'Building Detailed View Pages',
4 => 'Updating Home/New/Cool Pages'
);
my $step = $in{'step'} || 1;
my $limit = $in{'limit'} || 20;
my $offset = $in{'offset'} || 0;
my $auto = $in{'auto'} || 0;
my $start = time();
my $date = &get_date;
my $time = &get_time;
my $header = qq~
<html>
<head>
<title>Rebuilding Directory -- Phase $phase</title>
~;
my $sub_head = qq~
</head>
<body bgcolor=#FFFFFF>
<H2><TT>Building Pages</TT></H2>
<P><em>Step: $steps{$step}</em>
<PRE>
Pages built on $date at $time
--------------------------------------------------------
~;
CASE: {
($step == 1) and do {
print $header;
print qq~<meta http-equiv="Refresh" content="2; URL=nph-build.cgi?staggered=1&step=2&auto=$auto">~ if ($auto);
print $sub_head;
my $t1 = time();
print "Backing up database . . .\n";
&build_backup;
print "Done (", time - $t1, " s)\n\n";
$t1 = time();
print "Building URL Index . . .\n";
&build_url_index;
print "Done (", time - $t1, " s)\n\n";
print "Updating New and Popular Records . . .\n";
$t1 = time();
&build_update_newpop;
print "Done (", time - $t1, " s)\n\n";
print "Updating ratings .. \n";
$t1 = time();
&build_update_ratings;
print "Done (", time - $t1, " s)\n\n";
my $elapsed = time() - $start;
print "------------------------------------------------\n";
print "Step 1 took $elapsed seconds.\n\n";
print qq~</PRE><P><B><font face="Verdana" size=2><a href="nph-build.cgi?staggered=1&step=2&auto=$auto">On to Step 2</A></B></FONT></P>~;
last CASE;
};
($step == 2) and do {
my @category_list = &category_list; my $i;
print $header;
if ($auto) {
($offset > $#category_list) ?
(print qq~<meta http-equiv="Refresh" content="0; URL=nph-build.cgi?staggered=1&step=3&auto=$auto">~) :
(print qq~<meta http-equiv="Refresh" content="2; URL=nph-build.cgi?staggered=1&step=2&limit=$limit&offset=~, $offset + $limit, qq~&auto=$auto">~);
}
print $sub_head;
print "Rebuilding Categories $offset -> ", $offset + $limit - 1, ".\n\n";
for ($i = $offset; $i <= $offset + $limit -1; $i++) {
last unless ($category_list[$i] =~ /\w+/);
%category = ();
%subcategories = ();
@links = ();
@new_links = ();
@cool_links = ();
%stats = ();
$grand_total = 0;
my $t1 = time();
print "** Building Category: $category_list[$i] ... \n";
&build_single_category ($category_list[$i]);
print "** Done (", time - $t1, " s)!\n\n";
}
$offset = $offset + $limit;
my $elapsed = time() - $start;
print "------------------------------------------------\n";
print "This phase of step 2 took $elapsed seconds.\n\n";
($offset > $#categories) ?
print qq~</PRE><P><B><font face="Verdana" size=2><a href="nph-build.cgi?staggered=1&step=3">Go on to Step 3!</A></B></FONT></P>~ :
print qq~</PRE><P><B><font face="Verdana" size=2><a href="nph-build.cgi?staggered=1&step=2&limit=$limit&offset=$offset&auto=$auto">Next $limit Categories!</A></B></FONT></P>~;
last CASE;
};
($step == 3) and do {
print $header;
print qq~<meta http-equiv="Refresh" content="2; URL=nph-build.cgi?staggered=1&step=4&auto=$auto">~ if ($auto);
print $sub_head;
if ($build_detailed) {
my $t1 = time();
print "Generating detailed view pages . . . \n";
&build_detailed_view;
print "** Done (", time - $t1, " s)!\n";
}
else {
print "Detailed Building is not turned on -- Skipping!\n\n";
}
my $elapsed = time() - $start;
print "------------------------------------------------\n";
print "Step 3 took $elapsed seconds.\n\n";
print qq~</PRE><P><B><font face="Verdana" size=2><a href="nph-build.cgi?staggered=1&step=4&auto=1">Go on to Step 4!</A></B></FONT></P>~;
last CASE;
};
($step == 4) and do {
print $header, $sub_head;
my $t1 = time();
print "** Loading Category information . . .\n";
&build_category_information;
print "** Done (", time - $t1, " s)!\n\n";
$t1 = time();
print "** Loading Summary information . . .\n";
&build_stats (1);
print "** Done (", time - $t1, " s)!\n\n";
$t1 = time();
print "** Creating Home Page . . .\n";
&build_home_page;
print "** Done (", time - $t1, " s)!\n\n";
$t1 = time();
print "** Creating What's New Pages . . .\n";
&build_new_page;
print "** Done (", time - $t1, " s)!\n\n";
$t1 = time();
print "** Creating What's Cool Page. . .\n";
&build_cool_page;
print "** Done (", time - $t1, " s)!\n\n";
$t1 = time();
print "** Creating Top Rated Page. . .\n";
&build_rate_page;
print "** Done (", time - $t1, " s)!\n\n";
my $elapsed = time() - $start;
print "------------------------------------------------\n";
print qq~Step 4 took $elapsed seconds.\n\n<b><a href="$build_root_url" target="_top">Your site</a> is now up to date!</b>~;
last CASE;
};
&cgierr("Unkown step: $step.");
};
}
sub build_all {
# --------------------------------------------------------
# Rebuild the entire directory.
# Determine if we are printing to command line, or to browser.
# $nph ;
&html_print_headers() if ($use_html);
my $start = time();
my $date = &get_date;
my $time = &get_time;
# Print HTML Header
$use_html ?
print qq|<html><head><tittle>Links Manager: Building Pages</title></head>
<BASE TARGET="_top">
<BODY BGCOLOR=#FFFFFF><H2><TT>Building Pages</TT></H2>
<PRE>| :
print qq|Building Pages\n|;
print "Pages built on " . $date . " at " . $time . "\n";
print "--------------------------------------------------------\n\n";
==============================================
nph-verify.cgi...
#!usr/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: build.pl
# Description: This routine validates the links. It checks to see that a return code of
# 200 is returned for each link and flags any errors. Return codes of 404 (File
# Not Found) should be updated. Return codes of 500, should be checked but might still
# be valid. It will store the results in a log file specified in the config file.
#
# NOTE: This routine requires the LWP module and NET::FTP available from
# CPAN: http://perl.com/CPAN/modules/by-module/LWP/
#
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998
Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================
BEGIN {
eval {
# print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
require 5.004;
require "links.cfg"; # Change this to full path to links.cfg if you have problems.
unshift @INC, $db_lib_path;
require "db_utils.pl";
require "links.def";
};
if ($@) { print "Error Loading System Libraries. Reason: $@"; die $@; }
}
========================================
nph-email.cgi...
#!usr/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: nph-mail.cgi
# Description: Massmails updates.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998
Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================
# Required Librariers
# --------------------------------------------------------
BEGIN {
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \
require "links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
require "$db_lib_path/Mailer.pm";
};
if ($@) {
print "HTTP 1.0/200 OK\n";
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}
}
# ========================================================
eval { &main; }; # Trap any fatal errors so the program hopefully
$@ and &cgierr("Fatal error: $@"); # never produces that nasty 500 server error page.
exit;
sub main {
# --------------------------------------------------------
# $nph;
# Print full header.
my $use_html = 0;
$ENV{'REQUEST_METHOD'} and $use_html++;
$nph++;
&html_print_headers() if $use_html;
# Get form contents.
my (%in) = &parse_form() if $use_html;
my $start = time();
# Print a header.
$use_html and
Thank you,
Bob Messinger
www.associate-trackers.com