CSCI 4230
 Internet Application Development
 Fall 2001
 Homework #4

Due date: October 8, 2001 (Monday)

(1)    Write a HTML file, h4.html, and a CGI program, LinkCheck.pl, to accept an URL and check for links in the page.  Your solution should be hosted as the following URL for the TA to test with an unspecified URL:

http://dcm.uhcl.edu/your_account/h4.html

The page initially looks like the following in the browser:

If the user input

http://dcm.uhcl.edu/yue/c

which does not exist, your CGI program should display:

If the user input

http://dcm.uhcl.edu/yue/courses/csci4230/Fall2001/brokenlink.html

the output of your CGI program should be as close to below as possible:

Note that you should provides six statistical measures in a list.  Good links should be displayed as hyperlinks with sizes.

As another example, if the user input:

http://cs.stanford.edu/Degrees/

the output should be:

Note that the good links in green or blue are visited and unvisited hyperlinks.

Turn in source code of your HTML and CGI program and  screen shots of the three test cases.  Be sure that your solution is ready for the TA to test and make sure that no one can see your CGI source code (no LinkChecker.pl.$$$ nor LinkChecker.pl.bak, for example).

Since this is only one homework, you don't need handle URL likes http://dcm.uhcl.edu/yue/courses/csci4230/Fall2001 (missing trailing /).

Tips: the following modules may be useful: LWP::UserAgent, URI, HTML::LinkExtor and CGI.