CGI Date'n'Time program Clock.exe ================================= This CGI program is a Date'n'Time display for your Web pages. It is designed to be run on a WinNT/Intel box, but probably works on most Win95 systems too. It might be called from your HTML document like this: font=neat : Here the GIF characters is fetched from the directory 'neat'. The font parameter may hold any valid path relative to the directory holding Counter.exe. Examples: font=digits\roman font=..\gifs\letters\led The font directory should contain the files: 0.gif, 1.gif, ... 8.gif, 9.gif, Colon.gif, Dot.gif, Hyphen.gif, Slash.gif, Space.gif, A.gif, M.gif and P.gif with GIF images of each character. Only those characters used by the format you choose to output is needed though. Ex: If you only use 24 hour time format, A.gif, M.gif and M.gif is not required. fmt=11 This specifies the Time'n'Date format wanted. The first digit specifies the date format and the second digit specifies the time format. This is how 24th of Dec 1996 15:23 would be shown in different formats: Digit Date format Time format ===== =========== =========== 0 (No date) (No format) 1 96-12-24 15:23 2 961224 03:23PM 3 24.12.96 03:23 PM 4 24/12/96 N/A 5 12/24/96 N/A If fmt= is omitted a value of 00 is used. This will return a 1x1 pixel transparent GIF. tz=0 (Optional) This specifies the timezone relative to GMT in hours. A value of 0 results in GMT. Some other tz values: tz Country/Time zone == ================= -8 Pacific time (US & Canada) -7 Mountain time (US & Canada) -6 Central time (US & Canada) -5 Eastern time (US & canada) -4 Atlantic time (Canada) 1 Western Europe 2 Eastern Europe 3 Moscow 8 Hong Kong 9 Japan Sorry, but there are no way to specify half hours. :( My apologize is sent to Newfoundland, Tehran, Kabul, India, Adelaide, Darwin & possible other regions with half hour time zones. If tz= is omitted the local timezone of the server is used, and this works with all timezones, even half hour zones. :) The control file Clockctl.txt ============================= The first time Clock.exe is called it creates the file Clockctl.txt in the directory holding Clock.exe. This file may be edited to change the way the counter works. The file isn't an ordinary .ini file but the layout is similar. Countctl.txt contains one section: [ValidUsers]. The [ValidUsers] section is used to prohibit others from using your clock on their pages. Whenever clock.exe is called it compares the URL of the page calling it with the URL:s found in this section. The beginning of the calling pages URL must equal one of the lines in [ValidUsers]. If it doesn't, a broken image is returned. The auto-created file will place one line in this section: The domain name of the refering pages URL. On our server [ValidUsers] http://www.webcom.se/ prevents Clock.exe to be called from pages outside our domain. (To be precise: It may still be called from anywhere, but it will return a broken image when called from outside.) Notes: * If you want to allow Clock.exe to be called from anywhere place the line 'http' (without the apostrophes) in this Section. * Blank lines may be inserted anywhere in Clockctl.txt to make it easier to read. * Comments may be included at the end of any line. A semicolon is used to indicate that the rest of the line is a comment. * The auto-created file will allow the counter to be used from the same domain that used it the first time, and only from that domain. The file Clockctl.txt could look like this: -------- 8< -------- 8< -------- 8<---- CUT HERE [ValidUsers] http://www.webcom.se/ ; Allow only Webcom pages to use counter -------- 8< -------- 8< -------- 8<---- CUT HERE Questions about Clock.exe should go to pedro@algonet.se