ACCC Home Page Academic Computing and Communications Center  
Accounts / Passwords Email Labs / Classrooms Telecom Network Security Software Computing and Network Services Education / Teaching Getting Help
 
The ADN Connection, January/February 1996 The A3c Connection
Jan/Feb 1996 Contents The ADN Post FTP, the Protocol A Quick Introduction to FTP
A Real Life FTP Example: Web Publising Without UNIX UNIX World Wide Web Tools Departmental Web Pages About the ADN Connection

UNIX World Wide Web Tools

 
The Campus Beat
WWW Experts

If you're just getting started with publishing on the World Wide Web and need basic how-tos and specific instructions on how to do it here at UIC, then you need: http://www.uic.edu/depts/accc/webpub/contents.html

But if you're an old hand, read on; we've got new ways to spice up your Web publishing. If the Web tools below sound interesting, check out the details at: http://www.uic.edu/depts/accc/webpub/advanced_tools.html

 
     
 
     
Do-It-Yourself Hot Maps
  You've seen hot maps on the Web; they're clickable images that return various URLs depending on the place in the image that you click. Hot maps aren't new, but we have two new tools that will make it much easier for you to use them in your ADN-served WWW pages.
  • mapedit, a tool that helps you define the hot regions of the map and assign WWW links to them
  • imagemap, a CGI (Common Gateway Interface) script (an external program that is executed by the HTTP server) from NCSA that allows you to register your hot maps with an ADN HTTP server without our help
  • For the image map itself, you need two ingredients: an image and a map file. You can use any image in GIF format. (It doesn't have to be a map!) The mapfile is a simple ASCII file that tells the server which URL to return when the various regions in the image are selected. Thus the map file links each region on the image (rectangular, circular, or polygonal) to the appropriate URL. It can be a bit tedious to make the map file by hand, but the mapedit tool makes the process fairly straightforward.

    Include your mapped image in your Web page with an <img> tag as usual, but because it's also a link, surround the <img> tag with anchor tags (<a> and </a>). For the anchor's href, use the URL for imagemap (on www.uic.edu if your image map is on tigger, and on www2.uic.edu if it's on icarus), ending with the pathname of the map file as it would be written in a URL.

    For example, suppose that your account is on tigger and your netid is adabyron, so that the URL for your public_html directory on www.uic.edu would be ~adabyron. To use the image mymap.gif and the map file mymap.map (both in your public_html directory) in your personal home page, you'd use: <a href="http://www.uic.edu/htbin/imagemap/~adabyron/mymap.map"><img ismap alt="hotmap" src="http://www.uic.edu/~adabyron/mymap.gif"></a>

    (If your account and the image map are on icarus, just change the www.uic.edu in the above to www2.uic.edu)

     
         
    Do-it-yourself Web Forms
      With the help of the FormMail CGI script, you can include forms in your Web pages that the people browsing them can fill in and submit. FormMail collects the filled-out forms and emails them to you; it's available on both www.uic.edu (tigger) and www2.uic.edu (icarus). Forms are much better than simple mailto URLs because they let you structure the input, asking the specific questions that you want answers for.

    To use FormMail, create the HTML form in the normal way, but specify the URL of the FormMail script as the <form> tag's "action" attribute: <form method="post" action="http://www.uic.edu/htbin/FormMail/...">
    (More about the ... in a bit.) You also need to include a couple of hidden tags, including one to give the form a FormMail name: <input type="hidden" name="fm_name" value="your_form's_name">

    And finally, you authorize the entire process by creating a special auxiliary file named .formcap, which includes a line with your form's name. For forms in your personal WWW home page, the .formcap file should be in your public_html directory. The "..." in the <form> action above is the pathname part of the URL for the .formcap file. (So for adabyron's personal home page, with the .formcap file in her ~adabyron/public_html directory, the "..." would be ~adabyron/.formcap).

    Use the FormMail script on the same machine as your .formcap file; since the above uses FormMail on tigger (www.uic.edu), your .formcap file must also be on tigger. If your .formcap file is on icarus, then use the FormMail CGI script on icarus; just change the www.uic.edu in the <form> tag above to www2.uic.edu.

    When FormMail receives a filled-out form, it reads and formats the input, and sends the results in a email note to the owner of the specified .formcap file. You can use FormMail to process multiple forms (assign a FormMail name to each form, and put each name in a separate line in your .formcap file). You can use procmail (see the September/October 1995 issue of The ADN Connection) to forward one form's results to one person, and another's to someone else. In this way, a departmental Webmaster can publish forms on behalf of different offices within the department without having to personally handle every filled-out form.

     
         
    Keeping Track of Your Web Pages
      The third tool is not a CGI script, although it can take the place of one. Many people have asked us about running counters, not so that each browser will know he or she is the 135,466th person to visit the page, but just to know, on a day-to-day basis, how popular a particular Web page is.

    The best way to do this is to analyze the Web server's log files, and webstat can do just that. All you have to do to turn webstat on for the files in your public_html directory is to create a configuration file named .webstat in that directory. (It can even be a zero length file if you want to use webstat's defaults.) Then once a night webstat (the program) will find your .webstat configuration file, look through the HTTP server's log file to find all instances of your files being served on that day, and put its report in your directory (or update the already existing webstat report). In addition to telling you which files have been requested, webstat will tell you the countries your browsers come from. You might discover a fan club you never knew existed!

    Comments are appreciated; send them to
    Bob Goldstein, bobg@uic.edu
     
    The ADN Connection, Jan/Feb 1996 Previous:  A Real Life FTP Example: Web Publising Without UNIX Next:  Departmental Web Pages


    1999-9-2  connect@uic.edu
    UIC Home Page Search UIC Pages Contact UIC