% Sub IncrementCounter() Set fs = Server.CreateObject("Scripting.FileSystemObject") counter_file = Server.MapPath("count/counter.txt") Set txt = fs.OpenTextFile( counter_file ) Application("wjjh") = txt.ReadLine txt.Close Application("wjjh") = Application("wjjh") + 1 Set txt = fs.CreateTextFile( counter_file, True ) txt.WriteLine(Application("wjjh")) txt.Close End Sub Function GCounter( counter ) Dim S, i, G S = CStr( counter ) For i = 1 to Len(S) G = G & "" Next GCounter = G End Function If IsEmpty(Session("wjjhConnected")) Then Application.Lock IncrementCounter Application.UnLock End If Session("wjjhConnected") = True %>