| Academic Computing and Communications Center | ||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
UNIX World Wide Web Tools |
||||
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.
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/...">
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 |
||||
| 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 |
|