EE-WEB Assignment 11

Program 1, 30pts.

Write a CGI script that would generate or modify a web page with the guest book each time a visitor wants to add his or her comment about your web site. Make sure that the visitors cannot screw up your Web site by including HTML tags into thier text. Also use both JavaScript and server side verification to prevent a visitor from submitting an incomplete data (i.e. missing comment or name).

The front end web page may be located anywhere. The CGI script should be located on the linux machine. The CGI script should add the comment to the already exisiting web page, and then make the web browser jump to it (meta-refresh or JavaScript). The web page with guest book should be also visible directly without going through a CGI script via another link located on your web site.

Hints: You can either read the existing Web page, insert a new comment, and then copy the new page onto the old one, or otherwise you may store all comments in a separate file, append to that file, and then generate the updated guest book Web page from the scratch using that separate data file.

You may utilize CGI scripts available to public as sharware or freeware by customizing them. If that is the case please mention it in your e-mail and provide the location of the original source code. Exception: you cannot reuse work of the other student of the Web programming class. Customizing someone else's code can be less time consuming, it may be more difficult though.

Senior students: you cam modify ths assignment: this is not the guest book but a senior project log. Someone may write a weekly memo that will be appended with the date of posting. Text is appended only if the user provides correct password. Password can be hardcoded into the program or read from the file.

A "CGI script" phrase is used here. Yes, you may use other languages than PERL. This hoemwork is about CGI technology and not about any particular programming language.

Program 2, 20pts.

Write a PERL program than implements the counter server that runs on port 4000. The server should wait for a client, return the number of clients connected so far and disconnect. The server should also read the initial count of connections from a file called count.txt and update that file so that it contains the current count of connections. If the file does not exist, create one and start from zero.

Homework Submission

Attach all source code in files with proper names and extensions (*.html, *.java, *.pl, *.php, .htaccess e.t.c.). Do not ZIP files together or include compiled files (e.g. *.class). In case of dynamic Web pages (JavaScript or CGI) or Java applets also send the complete URL (including http://) that points to a page on your Web site that demonstrates your homework. Send your homework via e-mail to the instructor. Please set the message subject to: web-hwB.

Thank you.

web site front local main page local list page print this page   general bookmarks software bookmarks go back close this page copyright info   visitor counter