RE: global.asa - current user counting
Oops, the code is being hidden from view due to the tags within it. Trying again with a PRE tag, hopefully it will show now... (If not, view the source to get the code)
I think this one is really easy, and even if you never used global.asa don't worry, just put the one I have at this page for download at the root of your page (e.g. www.yourpage.com/global.asa). If you are unfamiliar with global.asa, be sure to also check out this article on Global.asa. Now all you need is to keep track of a counter as each new user enters your page. You'll also need to decrement your counter when someone leaves, and have code to display the current count.
Explaining Application Variables
Application variables work like session variables except that the value of Application variables are the same for all the users, and the values of session variables are different for each user. An instance of every session variable is created for every user. Only one instance of all Application variables is created when the server starts up. Hopefully with the example you will understand better.
Well,... after lots of research I made this code that show the users that are seeing your page on real-time by getting the info from the application variable...
response.write "Are Now " & Application("WhosOn") & " users at this page."
This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes. For more information go to: http://www.law.cornell.edu/uscode/17/107.shtml
. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.