require TripodDate;
$CGI = new TripodDate;
$todays_date = $CGI->currentDate();
$form_address = $CGI->param('address');
@all_inputs = $CGI->param();
$CGI->redirect('http://www.tripod.com'); <- redirects to the Tripod front page
* currentDate(); * convertMonthNameToInt(); * currentDay(); * convertIntToMonthName(); * currentMonth(); * dateIsPast(); * currentYear(); * addNMonthsToDate(); * massageDate(); * addNDaysToDate(); * convertYearToYYYY(); * isValidDate();
$todays_date = $DATE->currentDate();
$unformatted_date = '9/6/99'; $formatted_date = $DATE->massageDate($unformatted_date);
$two_digit_year = '78'; $four_digit_year = $DATE->convertYearToYYYY();
$month_name = 'February'; $month_number = $DATE->convertMonthNameToInt($month_name); $month_name_again = $DATE->convertIntToMonthName($month_number);
$date_in_question = '1/1/2000'; if ($DATE->dateIsPast($date_in_question)) { print "Y2K has already occurred.\n"; } else { print "Y2K hasn't happened yet - there's still time to prepare!\n"; }
$moon_walk_date = '07/20/69'; $five_days_later = $DATE->addNDaysToDate($moon_walk_date, '5'); $ten_months_earlier = $DATE->addNMonthsToDate($moon_walk_date, '-10');
$template_file = 'log_template.txt'; $variable_hash{timezone} = $ENV{TZ}; $variable_hash{ip_address} = $ENV{REMOTE_HOST}; $variable_hash{browser} = $ENV{HTTP_USER_AGENT}; $log_line = $INSERT->fetchInsert($template_file); open (LOG, '>> my_log.txt'); print LOG $log_line; close LOG;
----------------------------- Timezone: $timezone IP: $ip_address Browser: $browser -----------------------------
To: $email From: FredFlintstone@hotmail.com Subject: YabbaDabbaDoo! Hello $name, Congratulations! You're user number $number of this mail script!
require TripodMail; $MAIL = new TripodMail; $mail_template = "./flintstones_mail.txt"; %variables = ('email' => 'Wilma@gurlmail.com', 'name' => 'Wilma', 'number' => '2'); $MAIL->sendMail($mail_template, \%variables);
$page_location = 'example.html'; $variable_hash{timezone} = $ENV{TZ}; $variable_hash{ip_address} = $ENV{REMOTE_HOST}; $variable_hash{browser} = $ENV{HTTP_USER_AGENT}; $PAGE->sendPage($page_location, \%variable_hash); exit;
Example Page Example Page You are coming in from this timezone: $timezone You are using the $browser browser. Your ip address is $ip_address.
Example Page Example Page You are coming in from this timezone: US/Eastern You are using the Mozilla/4.61 [en] (Win98; U) browser. Your ip address is 208.7.131.186.
$PAGE->printHeader(); print "A really simple page."; exit;