Member of Software HyperBanner
Member of Software HyperBanner
Webstat 1.10 (06/23/98)
Webstat Homepage

Webstat manual

1. About Webstat
2. What is new since version 1.0 ?
3. Who can use Webstat ?
4. Webstat Installation
5. Customizing statistics presentation
6. Known problems
7. Webstat bonus pack
8. Demonstration

(For more information please visit: http://www.cgiexpert.com/cgiexpert_webstat.htm).

1. About Webstat

Webstat is a freeware CGI application for generating and showing web statisics for your site. With Webstat you can get statistics about hit counts, refering page, visitors country, visitors IP-address, visitors domaine name, hit count charts with arbitrary acurracy and size etc. The statistics presentation page can be customised with your on html code.

Webstat is created using CGIExpert for Borland Delphi (http://www.cgiexpert.com), a powerful shareware component suite for Borland Delphi & C++Builder that makes CGI, ISAPI and NSAPI as simple, as dropping a component into a form.

If you would like full source code for Webstat, this is available too, however not free. Full source is available when registering CGIExpert professional or when registering the "Webstat Bonus pack" 29USD (to compile source from "Webstat Bonus pack" you need CGI Expert Light or Pro"). With any of those registrations you also get:
- A compiled version of Webstat, without any webstat "Advertisment" anuwhere in each statistics presentation.
- An additional module (ISAPI filter), that lets you create statistics without adding java script code on each html page.
For Information about registration, please visit page http://www.cgiexpert.com/cgiexpert_webstat.htm

back

2.What is new since version 1.0 ?

The file format for the generated statistics file (webstat.stat1 and webstat.stat2) in version 1.1 is same as in version 1.0, thus you can use your old statistics files with the new version of Webstat application. The following is improved since version 1.0:
1)All language texts is now retrieved from the statistics master file (webstat.htm) making it possible to translate it to any customised language.
2)You can now make the statics presentation page language sensitive by using separate masterfile depending on the remote host domain (webstat.fr for ".fr" host, "webstat.ge" for ".fr" host etc).
3)You can now adjust the time in presentation page according to actual time and not the time where the server is located.
4)A utility (using acookie) is added making it possible to avoid generating statistics when you visit your own page.
5)A few bugs in presentation page is corrected.
6)If registering the "Webstat bonus pack", you get an alternate method to generate statistics by using the ISAPI filter "WebstatFilter.dll".

back

3.Who can use Webstat ?

Webstat is a win9x/WinNT CGI application. The following is required to be able to use webstat:
1)Any MS-Windows that supports the CGI interface.
2)An account where you have abilities to run CGI applications with read and write abilities for the Webstat CGI.
3)To use the ISAPI filter of the "Webstat bonus pack" to generate statistics you need a webserver that supports the ISAPI interface (IIS).
4)To use the ISAPI filter of the "Webstat bonus pack" need abilities to add an ISAPI filter in the webserver configuration menu.

back

4.Webstat installation

The CGI "webstat.exe" is used both for generating statistics and showing statistics. If registering the "Webstat bonus pack", you get an alternate method to generate statistics by using the ISAPI filter "WebstatFilter.dll". To show statistics you simply call webstat.exe (with no parameters) from your browser.

Installation when using "webstat.exe" to generate statistics:
1)Add webstat.exe and webstat.htm to a directory configured for executing CGI applications on a Windows based www-server (The configuration is done in the webserver configuration menu).
2)Create to empty files named "webstat.stat1" (short history) and "webstat.stat2" (long history) and place them in same directory as the file webstat.exe is located in (If possible the the two files are automatically created). It is also possible to use the files "webstat.stat1" and "webstat.stat2" from previous statistics using Webstat 1.0.
3)Make sure that the files "webstat.stat1" and "webstat.stat2" have read and write access by everyone.
4)Add the following html code in each document that is supposed to generate statistics:
<script language="JavaScript">
<!--
document.write('<a href="/scripts/webstat.exe">','<img src="/scripts/webstat.exe?action=stat&referer=',escape(document.referrer) ,'" border=0></a>')
//-->
</script>
note1, '/scripts/webstat.exe' must be changed to your specific location.
note2, Same tcp/ip address and browser combination does only generate statistics if it occurs with an interval of minimum 30 minutes.

Installation when using "Webstat bonus pack" and ISAPI filter(WebstatFilter.dll):
1)Add webstat.exe, webstatFilter.dll and webstat.htm to a directory configured for executing CGI applications on a Windows based www-server (The configuration is done in the webserver configuration menu).
2)Install file webstatFilter.dll as an ISAPI filter in the IIS filter:
To install an ISAPI filter to IIS 4 you just add the filter in the ISAPI filter tab of the specified web property.
To install an ISAPI filter in previous version of IIS you do like this:
a) Stop the www-server
b) Add the full path of your isapi filter to the register key:
HKEY_LOCAL_MACHINES\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters
c)Start the www-server.

back

5.Customizing statistics presentation

To show statistics you simply call the CGI webstat.exe (with no parameters) from your browser. The CGI will then use the file "webstat.htm" as master file when creating the output. Each time a %'variablename'% will occur in the master file, this will be replaced by some statistics data.
If calling the webstat with additional parameter "STOPSTAT" (http://domain/cgi_directory/webstat.exe?STOPSTAT)a cookie will be set in your browser that will prevent generating statistics when visiting your own site. The cookie is removed by calling http://domain/cgi_directory/webstat.exe?STARTSTAT

Customising masterfiles
1.You can edit any text in the master files to your prefered language.
2.You can add or remove any %'variablename'% in the masterfiles to make your own customised statistics presentation.
3.You can force webstat.exe to use another master file by calling the CGI like this http://domain/cgi_directory/webstat.exe?file=filename.privat. By doing this you can have one public statistics page and one private for your own use.
4.Webstat.exe is choosing master file depending on who is the visitor. Default masterfile is "webstat.htm" but first of all it looks for a file named webstat.'domain extension' using remote domain extension of the visitor. Example: A visitor with remote domain www.isp.fr will use file "webstat.fr" if it exists, else webstat.htm"
5.You can change the time in presentation page according to the current time of your location. You do this by adding the text "%TZx" first in your master file, where "x" is your offset according GMT time.

The following variable names are relevant in a master file:

Summary statistics variables: %FIRST_DAY%- First day of the statistics
%DATE% - The current date
%TIME% - The current time
%HITS_TODAY% - Number of hits the current day
%HITS_1D% - Number of hits the last 24 Hours
%HITS_7D% - Number of hits the last 7 Days
%HITS_30D% - Number of hits the last 30 Days
%HITS_365D% - Number of hits the last 365 Days
%AVG_7D% - Average of hits the last 7 Days
%AVG_30D% - Average of hits the last 30 Days
%AVG_365D% - Average of hits the last 365 Days
%TOP_30% - Top hits the last 30 Days
%TOP_30_DAY% - Top hits day the last 30 Days
%TOP_365% - Top hits the last 365 Days
%TOP_365_DAY% - Top hits day the last 30 Days

Statistics tables variables:
Statistics table are generating the content inside a html table. To use the variables properly, you must sourround the table like this:
<table><tr><td colspan=2>my customised table headers</td></tr>%LASTVISITORSTAT_X</table>

%LASTVISITORSTAT_X% - Last visitors statistics. (X: Maximum to show)
%BROWSERSTAT_X_Y% - Browser statistics (X: Out of Last 'X' visitors, Y: Maximum to show)
%REFERERSTAT_X_Y% - Referer statistics (X: Out of Last 'X' visitors, Y: Maximum to show)
%REMOTEADDRSTAT_X_Y% - Remote address statistics (X: Out of Last 'X' visitors, Y: Maximum to show)
%REMOTEDOMAINSTAT_X_Y% - Remote domain statistics (X: Out of Last 'X' visitors, Y: Maximum to show)

The following line is used to show a chart:
<img src="%SCRIPT_NAME%?ACTION=CHART&WIDTH=600&HEIGHT=200&DAYS=90&ACCURACY=1D&%RANDOM%" width=600 height=200>
Chart parameters:
WIDTH : The width of the chart to generate
HEIGHT : The height of the chart to generate
DAYS: Number of days to use when calculating
ACCURACY: Number of Days (D) or Hours(H) to in each column in the chart
TZ (optional): Sets the timezone used when calculating the chart (1=GMT+1, 2=GMT+2 etc)

back

6.Known problems

1. Using a frames the referring page will by most browsers be set to the frame and not the the remote refering page. This is no problem if using the isapi filter in "webstat bonus pack" for generating statistics.

back

7.Webstat bonus pack

If you would like full source code for Webstat, this is available too, however not free. Full source is available when registering CGIExpert professional or when registering the "Webstat Bonus pack" 29USD (to compile source from "Webstat Bonus pack" you need CGI Expert Light or Pro). With any of those registrations you also get:
- A compiled version of Webstat, without the webstat "Advertisment" at bottom of each statistics presentation.
- An additional module (ISAPI filter), that lets you create statistics without adding java script code on each html page.
Price of "Webstat bonus pack" is only 29 USD. For Information, please visit page http://www.cgiexpert.com/cgiexpert_webstat.htm or mail support@cgiexpert.com

back