Hi All
I are working on a project and I need this script changed so that at the end it will redirect to a url after 5 seconds.
my ($submitResult, $tempTime);
# pass the CGI object parameters to the submit object
$objSubmit->AddCgiParameters($objFormData);
# open the tab file
$objTabFile->OpenFile;
# see what engines to use and ready the submit object
&ProcessEngines;
# print out what time we started
$tempTime = $objUtility->GetDate . " " . $objUtility->GetTime;
$objPage->WriteLine ($objPage->Bold ("Started: " . $tempTime));
$submitResult = "Started: " . $objUtility->GetDate . " " . $objUtility->GetTime . "\n";
# print out all the paramenters just for fun
my ($param);
foreach $param ($objFormData->param) {
unless ($param eq $FORMNAME_URL || $param eq $FORMNAME_ENGINES) {
$objPage->WriteLine("" . $objPage->Bold($param . ": ") . $objFormData->param($param));
$submitResult .= $param . ": " . $objFormData->param($param) . "\n";
}
}
$objPage->WriteLine();
# check to see if multiple urls were specified. if so, then split them into an
# array so we can loop through them.
my ($url, @urls);
if ($objUtility->InStr($objFormData->param($FORMNAME_URL),"\n")) {
@urls = $objSubmit->StringToArray("\n",$objFormData->param($FORMNAME_URL));
} elsif ($objUtility->InStr($objFormData->param($FORMNAME_URL),",")) {
@urls = $objSubmit->StringToArray(",",$objFormData->param($FORMNAME_URL));
} else {
$urls[0] = $objFormData->param($FORMNAME_URL);
}
# submit each url one at a time to the specified engines
foreach $url (@urls) {
# get rid of possible line break character.
chop $url if ($objUtility->RightChars($url,1) eq "\n" || $objUtility->RightChars($url,1) eq "\r");
if ($objUtility->IsAuthorizedDomain($url)) {
$objSubmit->AddParameters(url => $url);
$objPage->WriteHeader("Submitting: " . $url);
$submitResult .= "\n" . "Submitting: " . $url . "\n";;
# tell the submit object to do it
$objSubmit->Submit;
$submitResult .= $objSubmit->Results;
$tempTime = $objUtility->GetDate . " " . $objUtility->GetTime;
$objPage->WriteLine($objPage->Bold("Finished: " . $tempTime));
$objPage->WriteLine();
$submitResult .= "Finished: " . $objUtility->GetDate . " " . $objUtility->GetTime . "\n";
} else {
$objPage->WriteHeader("The URL '" . $url . "' is not authorized.");
$submitResult .= "\n" . "The URL '" . $url . "' is not authorized.\n";;
}
}
return $submitResult;
}
I have tried adding this bit of code to the bottom, though it works and redirects it distord the page somewhat.
This is the code I added but now removered.
# forward user to some page...
print "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 3.2//EN'>";
print "<html><head><title>$page_title</title>";
print "<META HTTP-EQUIV='Refresh' CONTENT='0; URL=http://www.somedomain.com'>";
print "</HEAD><BODY></BODY></HTML>";




Bookmarks