WWW Digital Clock!

[Dgclock 1.2]

Latest Release 1.2 (August 20, 1995)
Initial Release 1.1 (August 16, 1995)


Access since August 19: and the local time is: **:**

The source code of 1.2 is avalable as a gzip'd tar file at: ftp.semcor.com

-Please limit your ftp session to after business hours-

This program is compiled and tested on a Sparc 10 (SunOS 4.1.4), gcc 2.6.3, NCSA httpd 1.4 , CERN httpd 3.0 and Netscape 1.1N for Unix. If you use it in a different OS, please let me know.

This program is developed in my own time. My employer SEMCOR, Inc. has nothing to do with it.

How to use it

  1. The file dgclock-1.2.tar.gz is a gzip'd tar file. To extract the distribution, at the shell prompt, type:
        gunzip < dgclock-1.2.tar.gz | tar xvf -
        cd dgclock1.2
    

  2. Edit the file config.h, change following the directives:

    DigitDir
    This directive defines the directory where all the necessary digit images are kept. If you are using my Counter program, make sure that you do not specify the same digit directory. The digits used by this program are supplied with the source distribution in the clkdigitdir directory. Providing the correct path of the digit directory with the directive DigitDir is a must. Make sure that the digit directory is accessible and digit images are readable by httpd.

    ErrorLog
    This directive defines the full path of the error log file. The error messages will be written to this file. If the program fails to open this file, the error messages will be written to stderr. Make sure that httpd has write permission to this file.

    NormalLog
    This directive defines the full path of the normal log file. Any informative messages like unauthorized attempt to access the program (if the program is compiled with -DCHECK_REFERER) will be written to this file. If the program fails to open this file, the messages will be written to stderr. Make sure that httpd has write permission to this file.

  3. Please look at the Makefile at the base directory of the source distribution. The program can be compiled with various supports.

  4. At the shell prompt, type:
        make clean
        make
    
    It will make the GIF image combining library at the combine directory first, then the dgclock.cgi binary will be built.

  5. Copy dgclock.cgi to your system cgi-bin directory, or elsewhere if your site allows it.

  6. Refer to the program from your web page as:
        <img src="/cgi-bin/dgclock.cgi?ft=9|fr=69|fg=139|fb=116" align=absmiddle alt="**:**">
    
    Please give close attention to the parameters after the ? mark. The explanation for these parameters are given below:
      ft=9
         ft means frame thickness. 9 is the thinkness
         in pixel. The clock will be wrapped with a 3D
         frame of thickness 9. Use any value greater than 1,
         however for nice 3D effect use a value >= 6.
    
      fr=69
         fr is the red component of the frame color.
         It can be any value between 0 and 255.
    
      fg=139
         fg is the green component of the frame color.
         Valid range: 0-255.
    
      fb=116
        fb is the blue component of the frame color.
        Valid range: 0-255.
    
    Each parameter is separated by a | character. Make sure there is no newlines in the <img src= line and no space in the query srtring ( ?ft=9|fr=69|fg=139|fb=116). Please note that fp, fr, fg and fb all have to be in lower case. If you do not provide these parameters or if you provide someting wrong, no frame will be wrapped around the clock. You can be creative about the frame thickness and color.

    If you do not want any frame, you can refer to the program like:

        <img src="/cgi-bin/dgclock.cgi">
    


If you use Netscape, you can use client-pull to load the clock in every minute. Add the following line as the first line of your web page:
<META HTTP-EQUIV="Refresh" CONTENT=60>
Note: this may not work if you are caching images in the disk, because image will be loaded from the previous cache.

server-push hook as a option will be added for Netscape to the program itself in the next release or so. Transparent GIF support will be there as well.


Copyright

Copyright 1995 by Muhammad A Muquit. Permission to use, copy and modify this program for personal use is hereby granted without fee, provided that the program is not used for any financial gain and this copyright notice appear in all copies and both that copyright notice and this permission notice appear in supporting documentation. If the progam is ported to some other platform, no binary only distribution is allowed, the source and this copyright notice must be included with the distribution. This program is provided "as is" without express or implied warranty. Note: This program is developed in my own time. My employer SEMCOR, Inc. has nothing to do with it.

Acknowledgment

Thanks to John Cristy for ImageMagick. I took many routines from ImageMagick for the GIF image combining library.

I like to hear from you

If you are using this program, I like to hear from you. Please drop me a line. If you are having any problem with the program, please let me know as well. Feel free to send any suggestion. If you think that the program is cool, please consider sending me a picture postcard of the area where you live.

Muhammad A Muquit
SEMCOR, Inc.
65 West Street Road
Warminster, PA 18974
USA

Thanks.

Enjoy!


muquit@semcor.com

Last Update: August 20, 1995

Home Page