Posts Tagged ‘PERL’

Perl CGI Mailer Scripts

Monday, December 10th, 2007

Overview

Submission of form-based information on SML web servers takes place via CGI/Perl mailer scripts based around the freeware FormMail script.

New CGI Mailer Script

A Perl script was written as back-ends for the three web-forms linked from http://www.sml.hw.ac.uk/languages/onlineapplication/

The script are held under S:Apachecgi-binSMTP and is named formmail_eng_for_acad.pl. It is hard-coded to send mail only to Karen Morton, for security, and uses the Blat mailing program on the Apache web server PC. The script writes a return-url, which is passed to it from each web-form as follows:

<form action="/cgi-bin/smtp/formmail_eng_for_acad.pl" method="post" name="english application form">
<input type="hidden" name="required" value="first_name,last_name">
<input type="hidden" name="return_link_title" value="English for academic study and professional purposes">
<input type="hidden" name="return_link_url" value="http://www.hw.ac.uk/langWWW/english/courses/eap_is.html">

As all three forms uses the same Perl mailer script, the name of the form being submitted is identified from the Application_Form hidden field:

<input type="hidden" name="Application_Form" value="Register Online for Advanced Writing"> ÂÂ

Recall that the Apache webserver actually publishes from the C: drive of the web server PC, using a Robocopy script to synchronise with the contents of s:apachehtdocs every minute to ensure web services remain up on the event that the Novell server goes down.

Of future interest, perhaps, is a Perl module that writes directly to an Excel spreadsheet. Time doesn’t permit looking at this further just now.

Perl - minor tweak to staff logins script

Monday, May 14th, 2007

Script: N:SchoolutilsPerlstaffloginsstafflogins.pl

Action: Uses the Novell command NLIST USER to work out who is currently logged in.

Change: Lines 416 and 419 write a hyperlink, for each user displayed, linking to the HW Staff directory to search for contact details. The CGI script which performs the search is outwith SML control and was changed, now taking new parameters.

Exact Changes: The URL performing the staff search is now:
http://www.hw.ac.uk/home/contact_results?surname=$fullname_lookup&search_type=staff

September 2010
M T W T F S S
« Feb    
 12345
6789101112
13141516171819
20212223242526
27282930  

Copyright © 2010 Duncansapien’s Techblog. Search Engine Optimization by Star Nine. Distributed by Wordpress Themes