if (-A UB >= 30.0) {
die "sorry, this UltraBoard has not been used for over 30 days.";
}
else { print "everything is fine"; }
close (UB);[/code]
This will tell me if this particular UltraBoard (21stcentury) has not been accessed for over 30 days.
This is great, but i have over 3500 UltraBoard's!! Can someone please tell me how I can get this script to analyse all 3500 UltraBoard's automatically?
What about setting up an array with all the names of your boards and just having that check code run through each one? such as:
foreach $site (@sites) {
open (UB,"$site/UltraBoard.pl");
if (-A UB >= 30.0) {
die "sorry, this UltraBoard of $site has not been used for over 30 days.";
}
else { print "everything is fine for $site"; }
close (UB);
}
I know typing 3500 websites into an array is a heck of a lot of typing 100 sites a day you'll be done in a month--sorry don't have an idea for that. cut and paste and cut and paste and cut and paste and cut and paste......maybe that is a job for PHP??
--Bill
------------------
Lake Superior Smokin' Brews
www.smokinbrews.com
Sorry--it was late and I'm probably getting in over my head (typing without thinking ), I meant SQL, but you would still be stuck having to type in a database, unless you have the sites already in a database. I was thinking that you could have a file with all the site addresses in it and have the script open that file and write the addresses into the array. Maybe SQL and MySQL wouldn't make it any easier anyway--just make the information more flexable. There's all this hype around them right now, however. I've just been working with flat files lately, not relational databases and it just seemed that with that much data, if some of it was the same, like the base address /home . . . /ultraboard/ for example it wouldn't involve as much typing. But you could still do that by appending the base address with the variable.
--Bill
------------------
Lake Superior Smokin' Brews
www.smokinbrews.com
I hate to say this, but if you don't already have one, you really should have a list of all the "sites" you are hosting. Creating this database of ultraboards will help you in the future probably more than you realize...
foreach ($directory read from root ls listing) #that is for EVERY single directory - Ultraboard or not.
{
if ($directory/Ultraboard.cgi exists && not modified for 30 days) error message # AND add it to a list for future.
else #okay. move on folks.
}
Should work.
Owen
[This message has been edited by Owen (edited June 11, 2000).]
Bookmarks