Shadow Blade
Morrowland Presents Apron Tutorials
game - design - multimedia - web - programming - tutorials - There are currently viewers visiting Apron Tutorials.
   
 
TECHNICAL
GRAPHICAL
SOUND
GAME
WEB
ARTICLE
TOOL
PROJECT
 
 NEWS

  news

  history


 TECHNICAL TUTORIALS

  opengl

  direct3d

  c/c++

  visual basic

  java

  c#


 WEB TUTORIALS

  html

  dhtml

  asp

  php


 IMAGE EDITING

  photoshop

  draw sketch


 3D MODELING

  3d studio


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 DEMOS

  win32 api


 ARTICLES

  general

  opengl


 COMMUNITY

  about us

  credit

  contact






CURRENT VIEWERS IN ASP
I will in this tutorial show you how to make a script that shows you how many viewers your site has.



Global.asa

In order to at all time know how many viewers that are viewing your site, I choose to use the global.asa file. In this file we use the On_Start method for Application and Session as well as the Session_OnEnd.

Sub Application_OnStart
 Application("Active")=0
End Sub

Sub Application_OnEnd
 'no code is needed here
End Sub


Sub Session_OnStart
 Session.Timeout=20
 Session("Start")=Now
 Application.Lock
 Application("Active")=Application("Active")+1
 'this adds 1 to the number of active users
 'when a new user hits
 Application.unlock
End Sub

Sub Session_OnEnd
 Application.Lock
 Application("Active")=Application("Active")-1
 'this subtracts 1 from the number of active users
 'when a new user leaves
 Application.unlock
End Sub



currentusers.asp

In this file you call the function with the Application("Active") user.

Response.Write("There are " & Application("Active"))
Response.Write(" users on this page!")



PROJECT DESCRIPTION
Category Programming with ASP
Author Tommy Johannessen





Ronny André Reierstad
Morrowland All rights reserved Morrowland © 2002 Apron Tutorials

 LINKS

  morrowland home



 GAME DEVELOPEMENT

  nvidia

  gamedev

  polycount


 PROJECTS

  shadow blade

  game environment

  virtual 3d guide

  billy blue flame


 MATH AND PHYSICS

  mathworld

  physicsworld







PLEASE LINK TO


  All rights reserved Morrowland © 2007  
Ronny André Reierstad