![]()
|
Perl and JavaScript combine to make a very small utility to display the number of visitors to your site. You need a Frameset document. The initial document loaded in a "hidden" pane (ROWS=0,* or COLS=0,*) of the Frameset document calls the Perl script which adds a single byte to a "log" file which is then assessed with a stat()[7] call which returns its present size in bytes. Unless the entire frame is reloaded, each visitor is only tallied once per visit. The Perl script then writes HTML directly to the same hidden pane which can be read by any page at your site to display the current visitor count. The windows below contain the Perl and the two HTML documents which can be further tailored as needed.
|