Adding a hit counter SSI directive to a Web page
You can add a hit counter SSI directive to an HTML document. A hit counter keeps track of the number of HTTP clients that visit your Web site. The example below calls the counter.cgi file. If you do not have a counter.cgi file, see "Creating a hit counter using Perl." You must use the exec command in the SSI directive to execute the counter.cgi file. The HTTP server executes the SSI directive before the HTML document is sent to the HTTP client.
To add a hit counter SSI directive to a Web page
1. Click Application Starter, Utilities, Text Editor.
2. Choose the directory where the Web page is saved.
3. Open the Web page.
4. Add the following HTML code to the file:
<P ALIGN= center> You are visitor number
<B><!--#exec cgi="/cgi-bin/counter.cgi"--></B>
to visit this page</P>
Notes
If the hit counter does not work, check the following four things. First, make sure that you have changed the XBitHack directive, located in the srm.conf file, to on. Second, make sure the counter.cgi file is in the directory specified by the ScriptAlias directive. For information about the ScriptAlias directive, see "Using the srm configuration file." Third, make sure that you have changed the file permission of the counter.cgi file. For information about changing the permission of a file, see "Changing the file permission of a Perl program." Fourth, make sure that you give the HTTP server the ability to write to and read from the HTML file.
Make sure that you give all users read/write permission to the fileCount file. For information about changing the read/write permission of a file, see the Corel LINUX User Guide.
The fileCount file must be in the same directory as the HTML file. For information about the fileCount file, see "Creating a hit counter using Perl."