<## This data could be used to create a report of browser used by visitor, platform, etc...##> <##begin normal html document##> <##debug##> <## This applet is made available royalty-free for use by members of hts-users##> <## Title of this file ##> View &[title]

<## Data is captured and read by this one file. Vars are written to file sg_count.dat ##> <## -------SYSTEM CONFIGURATION -------------------------------------##> <## Please change configuration file names to match names and dirs---##> <## as they are used on your system.---------------------------------##> <## Note that Page Title is defined above ---------------------------##> <## SYSTEM CONFIGURATION VARIABLES ##> <## Use this line to let HTS build the URL for this applet. ##> <## the directory where gifs are stored (NOT your HTS dir)##> <##put yours here##> <## Note: sg_count.dat is the file we export TO and import FROM ##> <## This name can be left as is - as long as you have only ##> <## ONE sg_count.dat on your system-------------------------##> <## This name can be left as is - as long as you have only ##> <## ONE sg_count.dat on your system-------------------------##> <## ----END OF SYSTEM CONFIGURATION ---------------------------------##> <## ----BEGIN EXPORTING DATA TO FILE --------------------------------##> <## Note: dummy_field is used to maintain synchronization of data file even though 2 fields have been removed since applet was written. ##> <##No matching /export is required.- When all data is written, file is closed and loop is exited------------------------##> <## Begin IMPORT DATA routine-------------------------------##> <## note that imported field names have "cap_" prepended - this is to indicated that they are captured data and not confused with the current system variables. ##> <## delimiter may be changed, but must match delimiter used as this data file's export delimiter ##> <## we only want to see last record, so we loop through entire import without printing anything ##> <## To display the entire data file, remark these out and un-remark the other import /import commands which surround the form below. ##> <## All data has been imported---------------------------------------##> <## ----------------This is where the html page begins---------------## <## regular html code - macro vars indicated by "&[variable_name]"##>

&[title]
sg_count was written in Htmlscript 4GL by Alan Runfeldt. HTS is a cgi-extension to HTML. HTS code is supported by HTMLScript , a server-side preprocessor developed by Htmlscript.

This counter will display visitor's I.P. Address, Time and Date of visit, browser used and visitor number.

<##IMPORT DATA##> <##import command moved up top##> <## you can set a filter to display only certain entries##> <## ie: IMPORT DATA where cap_remote_addr ne 204.186.33.2 and cap_tm_mday ne 27 ##> <## This section includes code to evaluate am/pm and pad a "0" when needed##>
, <## ---- pad minutes with zero if minutes is less than 10 --------- ##> (PDT)
<##print the record number as the hit count##> You are visitor # &[hitcount]

<##/IMPORT##> <##End data import at this point - after looping through data file##> <##/import moved to BEFORE table prints - to display only last record##>

View/Save Program Source Code

Return to Home Page

<##/debug##>