|
Post by mackrackit on Feb 25, 2008 15:38:33 GMT -5
Hi,
Maybe I have missed it.
Has anyone put a "hit counter" on a page made with RB?
I have been embedding RB into pages on my main server, now I am trying to figure out how not to use apache and perl and do straight RB.
|
|
|
Post by mackrackit on Feb 25, 2008 19:46:40 GMT -5
Sorry to ask such a stupid question, I was not thinking. Here is my own answer. Place this at the beginning of the code, before the main loop. open DefaultDir$ + "\public\count\count.txt" for input as #f LINE INPUT #f, cnt cnt = cnt + 1 close #f open DefaultDir$ + "\public\count\count.txt" for output as #f print #f,cnt close #f
And then put print cnt
in the code loop where the counter is to be displayed. The only time the counter is incremented is when the page is first loaded or refreshed before an event takes place in the code loop.
|
|